diff options
author | Tejun Heo <htejun@gmail.com> | 2007-03-02 03:31:26 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-02 18:30:35 -0500 |
commit | 438ac6d5e3f8106a6bd1a5682c508d660294a85d (patch) | |
tree | 759aad55bb9850fe21709e12ca79cbdb3bf881f2 /drivers/ata/sata_nv.c | |
parent | b23ff24436c97fb26428f3a337faf189292cc307 (diff) |
libata: add missing CONFIG_PM in LLDs
Add missing #ifdef CONFIG_PM conditionals around all PM related parts
in libata LLDs.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/sata_nv.c')
-rw-r--r-- | drivers/ata/sata_nv.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 30eed12b3631..388d07fab5f7 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
@@ -230,7 +230,9 @@ struct nv_host_priv { | |||
230 | 230 | ||
231 | static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); | 231 | static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent); |
232 | static void nv_remove_one (struct pci_dev *pdev); | 232 | static void nv_remove_one (struct pci_dev *pdev); |
233 | #ifdef CONFIG_PM | ||
233 | static int nv_pci_device_resume(struct pci_dev *pdev); | 234 | static int nv_pci_device_resume(struct pci_dev *pdev); |
235 | #endif | ||
234 | static void nv_ck804_host_stop(struct ata_host *host); | 236 | static void nv_ck804_host_stop(struct ata_host *host); |
235 | static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance); | 237 | static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance); |
236 | static irqreturn_t nv_nf2_interrupt(int irq, void *dev_instance); | 238 | static irqreturn_t nv_nf2_interrupt(int irq, void *dev_instance); |
@@ -251,8 +253,10 @@ static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance); | |||
251 | static void nv_adma_irq_clear(struct ata_port *ap); | 253 | static void nv_adma_irq_clear(struct ata_port *ap); |
252 | static int nv_adma_port_start(struct ata_port *ap); | 254 | static int nv_adma_port_start(struct ata_port *ap); |
253 | static void nv_adma_port_stop(struct ata_port *ap); | 255 | static void nv_adma_port_stop(struct ata_port *ap); |
256 | #ifdef CONFIG_PM | ||
254 | static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg); | 257 | static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg); |
255 | static int nv_adma_port_resume(struct ata_port *ap); | 258 | static int nv_adma_port_resume(struct ata_port *ap); |
259 | #endif | ||
256 | static void nv_adma_error_handler(struct ata_port *ap); | 260 | static void nv_adma_error_handler(struct ata_port *ap); |
257 | static void nv_adma_host_stop(struct ata_host *host); | 261 | static void nv_adma_host_stop(struct ata_host *host); |
258 | static void nv_adma_post_internal_cmd(struct ata_queued_cmd *qc); | 262 | static void nv_adma_post_internal_cmd(struct ata_queued_cmd *qc); |
@@ -295,8 +299,10 @@ static struct pci_driver nv_pci_driver = { | |||
295 | .name = DRV_NAME, | 299 | .name = DRV_NAME, |
296 | .id_table = nv_pci_tbl, | 300 | .id_table = nv_pci_tbl, |
297 | .probe = nv_init_one, | 301 | .probe = nv_init_one, |
302 | #ifdef CONFIG_PM | ||
298 | .suspend = ata_pci_device_suspend, | 303 | .suspend = ata_pci_device_suspend, |
299 | .resume = nv_pci_device_resume, | 304 | .resume = nv_pci_device_resume, |
305 | #endif | ||
300 | .remove = nv_remove_one, | 306 | .remove = nv_remove_one, |
301 | }; | 307 | }; |
302 | 308 | ||
@@ -316,8 +322,10 @@ static struct scsi_host_template nv_sht = { | |||
316 | .slave_configure = ata_scsi_slave_config, | 322 | .slave_configure = ata_scsi_slave_config, |
317 | .slave_destroy = ata_scsi_slave_destroy, | 323 | .slave_destroy = ata_scsi_slave_destroy, |
318 | .bios_param = ata_std_bios_param, | 324 | .bios_param = ata_std_bios_param, |
325 | #ifdef CONFIG_PM | ||
319 | .suspend = ata_scsi_device_suspend, | 326 | .suspend = ata_scsi_device_suspend, |
320 | .resume = ata_scsi_device_resume, | 327 | .resume = ata_scsi_device_resume, |
328 | #endif | ||
321 | }; | 329 | }; |
322 | 330 | ||
323 | static struct scsi_host_template nv_adma_sht = { | 331 | static struct scsi_host_template nv_adma_sht = { |
@@ -336,8 +344,10 @@ static struct scsi_host_template nv_adma_sht = { | |||
336 | .slave_configure = nv_adma_slave_config, | 344 | .slave_configure = nv_adma_slave_config, |
337 | .slave_destroy = ata_scsi_slave_destroy, | 345 | .slave_destroy = ata_scsi_slave_destroy, |
338 | .bios_param = ata_std_bios_param, | 346 | .bios_param = ata_std_bios_param, |
347 | #ifdef CONFIG_PM | ||
339 | .suspend = ata_scsi_device_suspend, | 348 | .suspend = ata_scsi_device_suspend, |
340 | .resume = ata_scsi_device_resume, | 349 | .resume = ata_scsi_device_resume, |
350 | #endif | ||
341 | }; | 351 | }; |
342 | 352 | ||
343 | static const struct ata_port_operations nv_generic_ops = { | 353 | static const struct ata_port_operations nv_generic_ops = { |
@@ -449,8 +459,10 @@ static const struct ata_port_operations nv_adma_ops = { | |||
449 | .scr_write = nv_scr_write, | 459 | .scr_write = nv_scr_write, |
450 | .port_start = nv_adma_port_start, | 460 | .port_start = nv_adma_port_start, |
451 | .port_stop = nv_adma_port_stop, | 461 | .port_stop = nv_adma_port_stop, |
462 | #ifdef CONFIG_PM | ||
452 | .port_suspend = nv_adma_port_suspend, | 463 | .port_suspend = nv_adma_port_suspend, |
453 | .port_resume = nv_adma_port_resume, | 464 | .port_resume = nv_adma_port_resume, |
465 | #endif | ||
454 | .host_stop = nv_adma_host_stop, | 466 | .host_stop = nv_adma_host_stop, |
455 | }; | 467 | }; |
456 | 468 | ||
@@ -1003,6 +1015,7 @@ static void nv_adma_port_stop(struct ata_port *ap) | |||
1003 | writew(0, mmio + NV_ADMA_CTL); | 1015 | writew(0, mmio + NV_ADMA_CTL); |
1004 | } | 1016 | } |
1005 | 1017 | ||
1018 | #ifdef CONFIG_PM | ||
1006 | static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg) | 1019 | static int nv_adma_port_suspend(struct ata_port *ap, pm_message_t mesg) |
1007 | { | 1020 | { |
1008 | struct nv_adma_port_priv *pp = ap->private_data; | 1021 | struct nv_adma_port_priv *pp = ap->private_data; |
@@ -1053,6 +1066,7 @@ static int nv_adma_port_resume(struct ata_port *ap) | |||
1053 | 1066 | ||
1054 | return 0; | 1067 | return 0; |
1055 | } | 1068 | } |
1069 | #endif | ||
1056 | 1070 | ||
1057 | static void nv_adma_setup_port(struct ata_probe_ent *probe_ent, unsigned int port) | 1071 | static void nv_adma_setup_port(struct ata_probe_ent *probe_ent, unsigned int port) |
1058 | { | 1072 | { |
@@ -1555,6 +1569,7 @@ static void nv_remove_one (struct pci_dev *pdev) | |||
1555 | kfree(hpriv); | 1569 | kfree(hpriv); |
1556 | } | 1570 | } |
1557 | 1571 | ||
1572 | #ifdef CONFIG_PM | ||
1558 | static int nv_pci_device_resume(struct pci_dev *pdev) | 1573 | static int nv_pci_device_resume(struct pci_dev *pdev) |
1559 | { | 1574 | { |
1560 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | 1575 | struct ata_host *host = dev_get_drvdata(&pdev->dev); |
@@ -1602,6 +1617,7 @@ static int nv_pci_device_resume(struct pci_dev *pdev) | |||
1602 | 1617 | ||
1603 | return 0; | 1618 | return 0; |
1604 | } | 1619 | } |
1620 | #endif | ||
1605 | 1621 | ||
1606 | static void nv_ck804_host_stop(struct ata_host *host) | 1622 | static void nv_ck804_host_stop(struct ata_host *host) |
1607 | { | 1623 | { |