aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/acard-ahci.c6
-rw-r--r--drivers/ata/ata_generic.c2
-rw-r--r--drivers/ata/ata_piix.c4
-rw-r--r--drivers/ata/pata_acpi.c2
-rw-r--r--drivers/ata/pata_ali.c4
-rw-r--r--drivers/ata/pata_amd.c4
-rw-r--r--drivers/ata/pata_artop.c4
-rw-r--r--drivers/ata/pata_atiixp.c2
-rw-r--r--drivers/ata/pata_atp867x.c4
-rw-r--r--drivers/ata/pata_bf54x.c2
-rw-r--r--drivers/ata/pata_cmd640.c4
-rw-r--r--drivers/ata/pata_cmd64x.c4
-rw-r--r--drivers/ata/pata_cs5520.c6
-rw-r--r--drivers/ata/pata_cs5530.c6
-rw-r--r--drivers/ata/pata_cs5535.c2
-rw-r--r--drivers/ata/pata_cs5536.c2
-rw-r--r--drivers/ata/pata_cypress.c2
-rw-r--r--drivers/ata/pata_efar.c2
-rw-r--r--drivers/ata/pata_hpt366.c4
-rw-r--r--drivers/ata/pata_hpt3x3.c4
-rw-r--r--drivers/ata/pata_imx.c4
-rw-r--r--drivers/ata/pata_it8213.c2
-rw-r--r--drivers/ata/pata_it821x.c4
-rw-r--r--drivers/ata/pata_jmicron.c2
-rw-r--r--drivers/ata/pata_macio.c22
-rw-r--r--drivers/ata/pata_marvell.c2
-rw-r--r--drivers/ata/pata_mpc52xx.c8
-rw-r--r--drivers/ata/pata_mpiix.c2
-rw-r--r--drivers/ata/pata_netcell.c2
-rw-r--r--drivers/ata/pata_ninja32.c5
-rw-r--r--drivers/ata/pata_ns87410.c2
-rw-r--r--drivers/ata/pata_ns87415.c4
-rw-r--r--drivers/ata/pata_oldpiix.c2
-rw-r--r--drivers/ata/pata_opti.c2
-rw-r--r--drivers/ata/pata_optidma.c2
-rw-r--r--drivers/ata/pata_pdc2027x.c6
-rw-r--r--drivers/ata/pata_pdc202xx_old.c2
-rw-r--r--drivers/ata/pata_piccolo.c2
-rw-r--r--drivers/ata/pata_radisys.c2
-rw-r--r--drivers/ata/pata_rdc.c2
-rw-r--r--drivers/ata/pata_rz1000.c4
-rw-r--r--drivers/ata/pata_samsung_cf.c4
-rw-r--r--drivers/ata/pata_sc1200.c2
-rw-r--r--drivers/ata/pata_scc.c2
-rw-r--r--drivers/ata/pata_sch.c2
-rw-r--r--drivers/ata/pata_serverworks.c4
-rw-r--r--drivers/ata/pata_sil680.c4
-rw-r--r--drivers/ata/pata_sis.c4
-rw-r--r--drivers/ata/pata_sl82c105.c4
-rw-r--r--drivers/ata/pata_triflex.c4
-rw-r--r--drivers/ata/pata_via.c4
-rw-r--r--drivers/ata/sata_fsl.c4
-rw-r--r--drivers/ata/sata_inic162x.c4
-rw-r--r--drivers/ata/sata_mv.c8
-rw-r--r--drivers/ata/sata_nv.c6
-rw-r--r--drivers/ata/sata_rcar.c4
-rw-r--r--drivers/ata/sata_sil.c6
-rw-r--r--drivers/ata/sata_sil24.c10
-rw-r--r--drivers/ata/sata_sis.c2
-rw-r--r--drivers/ata/sata_via.c2
60 files changed, 113 insertions, 120 deletions
diff --git a/drivers/ata/acard-ahci.c b/drivers/ata/acard-ahci.c
index b51605ac5974..0cd7c7a39e5b 100644
--- a/drivers/ata/acard-ahci.c
+++ b/drivers/ata/acard-ahci.c
@@ -77,7 +77,7 @@ static bool acard_ahci_qc_fill_rtf(struct ata_queued_cmd *qc);
77static int acard_ahci_port_start(struct ata_port *ap); 77static int acard_ahci_port_start(struct ata_port *ap);
78static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); 78static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
79 79
80#ifdef CONFIG_PM 80#ifdef CONFIG_PM_SLEEP
81static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg); 81static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
82static int acard_ahci_pci_device_resume(struct pci_dev *pdev); 82static int acard_ahci_pci_device_resume(struct pci_dev *pdev);
83#endif 83#endif
@@ -118,13 +118,13 @@ static struct pci_driver acard_ahci_pci_driver = {
118 .id_table = acard_ahci_pci_tbl, 118 .id_table = acard_ahci_pci_tbl,
119 .probe = acard_ahci_init_one, 119 .probe = acard_ahci_init_one,
120 .remove = ata_pci_remove_one, 120 .remove = ata_pci_remove_one,
121#ifdef CONFIG_PM 121#ifdef CONFIG_PM_SLEEP
122 .suspend = acard_ahci_pci_device_suspend, 122 .suspend = acard_ahci_pci_device_suspend,
123 .resume = acard_ahci_pci_device_resume, 123 .resume = acard_ahci_pci_device_resume,
124#endif 124#endif
125}; 125};
126 126
127#ifdef CONFIG_PM 127#ifdef CONFIG_PM_SLEEP
128static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) 128static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
129{ 129{
130 struct ata_host *host = pci_get_drvdata(pdev); 130 struct ata_host *host = pci_get_drvdata(pdev);
diff --git a/drivers/ata/ata_generic.c b/drivers/ata/ata_generic.c
index 9498a7d3846f..9ff545ce8da3 100644
--- a/drivers/ata/ata_generic.c
+++ b/drivers/ata/ata_generic.c
@@ -241,7 +241,7 @@ static struct pci_driver ata_generic_pci_driver = {
241 .id_table = ata_generic, 241 .id_table = ata_generic,
242 .probe = ata_generic_init_one, 242 .probe = ata_generic_init_one,
243 .remove = ata_pci_remove_one, 243 .remove = ata_pci_remove_one,
244#ifdef CONFIG_PM 244#ifdef CONFIG_PM_SLEEP
245 .suspend = ata_pci_device_suspend, 245 .suspend = ata_pci_device_suspend,
246 .resume = ata_pci_device_resume, 246 .resume = ata_pci_device_resume,
247#endif 247#endif
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 6334c8d7c3f1..893e30e9a9ef 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -830,7 +830,7 @@ static bool piix_irq_check(struct ata_port *ap)
830 return ap->ops->bmdma_status(ap) & ATA_DMA_INTR; 830 return ap->ops->bmdma_status(ap) & ATA_DMA_INTR;
831} 831}
832 832
833#ifdef CONFIG_PM 833#ifdef CONFIG_PM_SLEEP
834static int piix_broken_suspend(void) 834static int piix_broken_suspend(void)
835{ 835{
836 static const struct dmi_system_id sysids[] = { 836 static const struct dmi_system_id sysids[] = {
@@ -1767,7 +1767,7 @@ static struct pci_driver piix_pci_driver = {
1767 .id_table = piix_pci_tbl, 1767 .id_table = piix_pci_tbl,
1768 .probe = piix_init_one, 1768 .probe = piix_init_one,
1769 .remove = piix_remove_one, 1769 .remove = piix_remove_one,
1770#ifdef CONFIG_PM 1770#ifdef CONFIG_PM_SLEEP
1771 .suspend = piix_pci_device_suspend, 1771 .suspend = piix_pci_device_suspend,
1772 .resume = piix_pci_device_resume, 1772 .resume = piix_pci_device_resume,
1773#endif 1773#endif
diff --git a/drivers/ata/pata_acpi.c b/drivers/ata/pata_acpi.c
index 5108b8744dce..b70fce2a38eb 100644
--- a/drivers/ata/pata_acpi.c
+++ b/drivers/ata/pata_acpi.c
@@ -265,7 +265,7 @@ static struct pci_driver pacpi_pci_driver = {
265 .id_table = pacpi_pci_tbl, 265 .id_table = pacpi_pci_tbl,
266 .probe = pacpi_init_one, 266 .probe = pacpi_init_one,
267 .remove = ata_pci_remove_one, 267 .remove = ata_pci_remove_one,
268#ifdef CONFIG_PM 268#ifdef CONFIG_PM_SLEEP
269 .suspend = ata_pci_device_suspend, 269 .suspend = ata_pci_device_suspend,
270 .resume = ata_pci_device_resume, 270 .resume = ata_pci_device_resume,
271#endif 271#endif
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index 1b7b2ccabcff..d19cd88ed2d3 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -589,7 +589,7 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
589 return ata_pci_bmdma_init_one(pdev, ppi, &ali_sht, NULL, 0); 589 return ata_pci_bmdma_init_one(pdev, ppi, &ali_sht, NULL, 0);
590} 590}
591 591
592#ifdef CONFIG_PM 592#ifdef CONFIG_PM_SLEEP
593static int ali_reinit_one(struct pci_dev *pdev) 593static int ali_reinit_one(struct pci_dev *pdev)
594{ 594{
595 struct ata_host *host = pci_get_drvdata(pdev); 595 struct ata_host *host = pci_get_drvdata(pdev);
@@ -616,7 +616,7 @@ static struct pci_driver ali_pci_driver = {
616 .id_table = ali, 616 .id_table = ali,
617 .probe = ali_init_one, 617 .probe = ali_init_one,
618 .remove = ata_pci_remove_one, 618 .remove = ata_pci_remove_one,
619#ifdef CONFIG_PM 619#ifdef CONFIG_PM_SLEEP
620 .suspend = ata_pci_device_suspend, 620 .suspend = ata_pci_device_suspend,
621 .resume = ali_reinit_one, 621 .resume = ali_reinit_one,
622#endif 622#endif
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index 1206fa6b62ca..8d4d959a821c 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -574,7 +574,7 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
574 return ata_pci_bmdma_init_one(pdev, ppi, &amd_sht, hpriv, 0); 574 return ata_pci_bmdma_init_one(pdev, ppi, &amd_sht, hpriv, 0);
575} 575}
576 576
577#ifdef CONFIG_PM 577#ifdef CONFIG_PM_SLEEP
578static int amd_reinit_one(struct pci_dev *pdev) 578static int amd_reinit_one(struct pci_dev *pdev)
579{ 579{
580 struct ata_host *host = pci_get_drvdata(pdev); 580 struct ata_host *host = pci_get_drvdata(pdev);
@@ -625,7 +625,7 @@ static struct pci_driver amd_pci_driver = {
625 .id_table = amd, 625 .id_table = amd,
626 .probe = amd_init_one, 626 .probe = amd_init_one,
627 .remove = ata_pci_remove_one, 627 .remove = ata_pci_remove_one,
628#ifdef CONFIG_PM 628#ifdef CONFIG_PM_SLEEP
629 .suspend = ata_pci_device_suspend, 629 .suspend = ata_pci_device_suspend,
630 .resume = amd_reinit_one, 630 .resume = amd_reinit_one,
631#endif 631#endif
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index 3aa4e655e3c6..96c05c9494fa 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -422,7 +422,7 @@ static const struct pci_device_id artop_pci_tbl[] = {
422 { } /* terminate list */ 422 { } /* terminate list */
423}; 423};
424 424
425#ifdef CONFIG_PM 425#ifdef CONFIG_PM_SLEEP
426static int atp8xx_reinit_one(struct pci_dev *pdev) 426static int atp8xx_reinit_one(struct pci_dev *pdev)
427{ 427{
428 struct ata_host *host = pci_get_drvdata(pdev); 428 struct ata_host *host = pci_get_drvdata(pdev);
@@ -444,7 +444,7 @@ static struct pci_driver artop_pci_driver = {
444 .id_table = artop_pci_tbl, 444 .id_table = artop_pci_tbl,
445 .probe = artop_init_one, 445 .probe = artop_init_one,
446 .remove = ata_pci_remove_one, 446 .remove = ata_pci_remove_one,
447#ifdef CONFIG_PM 447#ifdef CONFIG_PM_SLEEP
448 .suspend = ata_pci_device_suspend, 448 .suspend = ata_pci_device_suspend,
449 .resume = atp8xx_reinit_one, 449 .resume = atp8xx_reinit_one,
450#endif 450#endif
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c
index 30fa4ca4cef6..970f7767e5fd 100644
--- a/drivers/ata/pata_atiixp.c
+++ b/drivers/ata/pata_atiixp.c
@@ -298,7 +298,7 @@ static struct pci_driver atiixp_pci_driver = {
298 .id_table = atiixp, 298 .id_table = atiixp,
299 .probe = atiixp_init_one, 299 .probe = atiixp_init_one,
300 .remove = ata_pci_remove_one, 300 .remove = ata_pci_remove_one,
301#ifdef CONFIG_PM 301#ifdef CONFIG_PM_SLEEP
302 .resume = ata_pci_device_resume, 302 .resume = ata_pci_device_resume,
303 .suspend = ata_pci_device_suspend, 303 .suspend = ata_pci_device_suspend,
304#endif 304#endif
diff --git a/drivers/ata/pata_atp867x.c b/drivers/ata/pata_atp867x.c
index 7e73a0f1e323..a705cfca90f7 100644
--- a/drivers/ata/pata_atp867x.c
+++ b/drivers/ata/pata_atp867x.c
@@ -530,7 +530,7 @@ err_out:
530 return rc; 530 return rc;
531} 531}
532 532
533#ifdef CONFIG_PM 533#ifdef CONFIG_PM_SLEEP
534static int atp867x_reinit_one(struct pci_dev *pdev) 534static int atp867x_reinit_one(struct pci_dev *pdev)
535{ 535{
536 struct ata_host *host = pci_get_drvdata(pdev); 536 struct ata_host *host = pci_get_drvdata(pdev);
@@ -558,7 +558,7 @@ static struct pci_driver atp867x_driver = {
558 .id_table = atp867x_pci_tbl, 558 .id_table = atp867x_pci_tbl,
559 .probe = atp867x_init_one, 559 .probe = atp867x_init_one,
560 .remove = ata_pci_remove_one, 560 .remove = ata_pci_remove_one,
561#ifdef CONFIG_PM 561#ifdef CONFIG_PM_SLEEP
562 .suspend = ata_pci_device_suspend, 562 .suspend = ata_pci_device_suspend,
563 .resume = atp867x_reinit_one, 563 .resume = atp867x_reinit_one,
564#endif 564#endif
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c
index ba0d8a29dc23..03f2f2bc83bd 100644
--- a/drivers/ata/pata_bf54x.c
+++ b/drivers/ata/pata_bf54x.c
@@ -1619,7 +1619,7 @@ static int bfin_atapi_remove(struct platform_device *pdev)
1619 return 0; 1619 return 0;
1620} 1620}
1621 1621
1622#ifdef CONFIG_PM 1622#ifdef CONFIG_PM_SLEEP
1623static int bfin_atapi_suspend(struct platform_device *pdev, pm_message_t state) 1623static int bfin_atapi_suspend(struct platform_device *pdev, pm_message_t state)
1624{ 1624{
1625 struct ata_host *host = platform_get_drvdata(pdev); 1625 struct ata_host *host = platform_get_drvdata(pdev);
diff --git a/drivers/ata/pata_cmd640.c b/drivers/ata/pata_cmd640.c
index 57f1be64dbf2..c47caa807fa9 100644
--- a/drivers/ata/pata_cmd640.c
+++ b/drivers/ata/pata_cmd640.c
@@ -231,7 +231,7 @@ static int cmd640_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
231 return ata_pci_sff_init_one(pdev, ppi, &cmd640_sht, NULL, 0); 231 return ata_pci_sff_init_one(pdev, ppi, &cmd640_sht, NULL, 0);
232} 232}
233 233
234#ifdef CONFIG_PM 234#ifdef CONFIG_PM_SLEEP
235static int cmd640_reinit_one(struct pci_dev *pdev) 235static int cmd640_reinit_one(struct pci_dev *pdev)
236{ 236{
237 struct ata_host *host = pci_get_drvdata(pdev); 237 struct ata_host *host = pci_get_drvdata(pdev);
@@ -256,7 +256,7 @@ static struct pci_driver cmd640_pci_driver = {
256 .id_table = cmd640, 256 .id_table = cmd640,
257 .probe = cmd640_init_one, 257 .probe = cmd640_init_one,
258 .remove = ata_pci_remove_one, 258 .remove = ata_pci_remove_one,
259#ifdef CONFIG_PM 259#ifdef CONFIG_PM_SLEEP
260 .suspend = ata_pci_device_suspend, 260 .suspend = ata_pci_device_suspend,
261 .resume = cmd640_reinit_one, 261 .resume = cmd640_reinit_one,
262#endif 262#endif
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c
index 6bca3505b9e9..13ca5883285b 100644
--- a/drivers/ata/pata_cmd64x.c
+++ b/drivers/ata/pata_cmd64x.c
@@ -487,7 +487,7 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
487 return ata_pci_bmdma_init_one(pdev, ppi, &cmd64x_sht, NULL, 0); 487 return ata_pci_bmdma_init_one(pdev, ppi, &cmd64x_sht, NULL, 0);
488} 488}
489 489
490#ifdef CONFIG_PM 490#ifdef CONFIG_PM_SLEEP
491static int cmd64x_reinit_one(struct pci_dev *pdev) 491static int cmd64x_reinit_one(struct pci_dev *pdev)
492{ 492{
493 struct ata_host *host = pci_get_drvdata(pdev); 493 struct ata_host *host = pci_get_drvdata(pdev);
@@ -518,7 +518,7 @@ static struct pci_driver cmd64x_pci_driver = {
518 .id_table = cmd64x, 518 .id_table = cmd64x,
519 .probe = cmd64x_init_one, 519 .probe = cmd64x_init_one,
520 .remove = ata_pci_remove_one, 520 .remove = ata_pci_remove_one,
521#ifdef CONFIG_PM 521#ifdef CONFIG_PM_SLEEP
522 .suspend = ata_pci_device_suspend, 522 .suspend = ata_pci_device_suspend,
523 .resume = cmd64x_reinit_one, 523 .resume = cmd64x_reinit_one,
524#endif 524#endif
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c
index bcde4b786807..d65cb9d2fa8c 100644
--- a/drivers/ata/pata_cs5520.c
+++ b/drivers/ata/pata_cs5520.c
@@ -229,7 +229,7 @@ static int cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
229 return ata_host_register(host, &cs5520_sht); 229 return ata_host_register(host, &cs5520_sht);
230} 230}
231 231
232#ifdef CONFIG_PM 232#ifdef CONFIG_PM_SLEEP
233/** 233/**
234 * cs5520_reinit_one - device resume 234 * cs5520_reinit_one - device resume
235 * @pdev: PCI device 235 * @pdev: PCI device
@@ -278,7 +278,7 @@ static int cs5520_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
278 pci_save_state(pdev); 278 pci_save_state(pdev);
279 return 0; 279 return 0;
280} 280}
281#endif /* CONFIG_PM */ 281#endif /* CONFIG_PM_SLEEP */
282 282
283/* For now keep DMA off. We can set it for all but A rev CS5510 once the 283/* For now keep DMA off. We can set it for all but A rev CS5510 once the
284 core ATA code can handle it */ 284 core ATA code can handle it */
@@ -295,7 +295,7 @@ static struct pci_driver cs5520_pci_driver = {
295 .id_table = pata_cs5520, 295 .id_table = pata_cs5520,
296 .probe = cs5520_init_one, 296 .probe = cs5520_init_one,
297 .remove = ata_pci_remove_one, 297 .remove = ata_pci_remove_one,
298#ifdef CONFIG_PM 298#ifdef CONFIG_PM_SLEEP
299 .suspend = cs5520_pci_device_suspend, 299 .suspend = cs5520_pci_device_suspend,
300 .resume = cs5520_reinit_one, 300 .resume = cs5520_reinit_one,
301#endif 301#endif
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c
index 8afe854a5a50..48ae4b434474 100644
--- a/drivers/ata/pata_cs5530.c
+++ b/drivers/ata/pata_cs5530.c
@@ -326,7 +326,7 @@ static int cs5530_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
326 return ata_pci_bmdma_init_one(pdev, ppi, &cs5530_sht, NULL, 0); 326 return ata_pci_bmdma_init_one(pdev, ppi, &cs5530_sht, NULL, 0);
327} 327}
328 328
329#ifdef CONFIG_PM 329#ifdef CONFIG_PM_SLEEP
330static int cs5530_reinit_one(struct pci_dev *pdev) 330static int cs5530_reinit_one(struct pci_dev *pdev)
331{ 331{
332 struct ata_host *host = pci_get_drvdata(pdev); 332 struct ata_host *host = pci_get_drvdata(pdev);
@@ -343,7 +343,7 @@ static int cs5530_reinit_one(struct pci_dev *pdev)
343 ata_host_resume(host); 343 ata_host_resume(host);
344 return 0; 344 return 0;
345} 345}
346#endif /* CONFIG_PM */ 346#endif /* CONFIG_PM_SLEEP */
347 347
348static const struct pci_device_id cs5530[] = { 348static const struct pci_device_id cs5530[] = {
349 { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE), }, 349 { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE), },
@@ -356,7 +356,7 @@ static struct pci_driver cs5530_pci_driver = {
356 .id_table = cs5530, 356 .id_table = cs5530,
357 .probe = cs5530_init_one, 357 .probe = cs5530_init_one,
358 .remove = ata_pci_remove_one, 358 .remove = ata_pci_remove_one,
359#ifdef CONFIG_PM 359#ifdef CONFIG_PM_SLEEP
360 .suspend = ata_pci_device_suspend, 360 .suspend = ata_pci_device_suspend,
361 .resume = cs5530_reinit_one, 361 .resume = cs5530_reinit_one,
362#endif 362#endif
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c
index 2c0986fa4bb2..97584e8456d9 100644
--- a/drivers/ata/pata_cs5535.c
+++ b/drivers/ata/pata_cs5535.c
@@ -200,7 +200,7 @@ static struct pci_driver cs5535_pci_driver = {
200 .id_table = cs5535, 200 .id_table = cs5535,
201 .probe = cs5535_init_one, 201 .probe = cs5535_init_one,
202 .remove = ata_pci_remove_one, 202 .remove = ata_pci_remove_one,
203#ifdef CONFIG_PM 203#ifdef CONFIG_PM_SLEEP
204 .suspend = ata_pci_device_suspend, 204 .suspend = ata_pci_device_suspend,
205 .resume = ata_pci_device_resume, 205 .resume = ata_pci_device_resume,
206#endif 206#endif
diff --git a/drivers/ata/pata_cs5536.c b/drivers/ata/pata_cs5536.c
index 32ddcae5a360..6c15a554efbe 100644
--- a/drivers/ata/pata_cs5536.c
+++ b/drivers/ata/pata_cs5536.c
@@ -297,7 +297,7 @@ static struct pci_driver cs5536_pci_driver = {
297 .id_table = cs5536, 297 .id_table = cs5536,
298 .probe = cs5536_init_one, 298 .probe = cs5536_init_one,
299 .remove = ata_pci_remove_one, 299 .remove = ata_pci_remove_one,
300#ifdef CONFIG_PM 300#ifdef CONFIG_PM_SLEEP
301 .suspend = ata_pci_device_suspend, 301 .suspend = ata_pci_device_suspend,
302 .resume = ata_pci_device_resume, 302 .resume = ata_pci_device_resume,
303#endif 303#endif
diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c
index 3435bd6a5cc9..793018460d82 100644
--- a/drivers/ata/pata_cypress.c
+++ b/drivers/ata/pata_cypress.c
@@ -151,7 +151,7 @@ static struct pci_driver cy82c693_pci_driver = {
151 .id_table = cy82c693, 151 .id_table = cy82c693,
152 .probe = cy82c693_init_one, 152 .probe = cy82c693_init_one,
153 .remove = ata_pci_remove_one, 153 .remove = ata_pci_remove_one,
154#ifdef CONFIG_PM 154#ifdef CONFIG_PM_SLEEP
155 .suspend = ata_pci_device_suspend, 155 .suspend = ata_pci_device_suspend,
156 .resume = ata_pci_device_resume, 156 .resume = ata_pci_device_resume,
157#endif 157#endif
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c
index f440892225f4..4a57a6f032d9 100644
--- a/drivers/ata/pata_efar.c
+++ b/drivers/ata/pata_efar.c
@@ -288,7 +288,7 @@ static struct pci_driver efar_pci_driver = {
288 .id_table = efar_pci_tbl, 288 .id_table = efar_pci_tbl,
289 .probe = efar_init_one, 289 .probe = efar_init_one,
290 .remove = ata_pci_remove_one, 290 .remove = ata_pci_remove_one,
291#ifdef CONFIG_PM 291#ifdef CONFIG_PM_SLEEP
292 .suspend = ata_pci_device_suspend, 292 .suspend = ata_pci_device_suspend,
293 .resume = ata_pci_device_resume, 293 .resume = ata_pci_device_resume,
294#endif 294#endif
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index 8e76f79689d3..cbc3de793d1d 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -386,7 +386,7 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
386 return ata_pci_bmdma_init_one(dev, ppi, &hpt36x_sht, hpriv, 0); 386 return ata_pci_bmdma_init_one(dev, ppi, &hpt36x_sht, hpriv, 0);
387} 387}
388 388
389#ifdef CONFIG_PM 389#ifdef CONFIG_PM_SLEEP
390static int hpt36x_reinit_one(struct pci_dev *dev) 390static int hpt36x_reinit_one(struct pci_dev *dev)
391{ 391{
392 struct ata_host *host = pci_get_drvdata(dev); 392 struct ata_host *host = pci_get_drvdata(dev);
@@ -411,7 +411,7 @@ static struct pci_driver hpt36x_pci_driver = {
411 .id_table = hpt36x, 411 .id_table = hpt36x,
412 .probe = hpt36x_init_one, 412 .probe = hpt36x_init_one,
413 .remove = ata_pci_remove_one, 413 .remove = ata_pci_remove_one,
414#ifdef CONFIG_PM 414#ifdef CONFIG_PM_SLEEP
415 .suspend = ata_pci_device_suspend, 415 .suspend = ata_pci_device_suspend,
416 .resume = hpt36x_reinit_one, 416 .resume = hpt36x_reinit_one,
417#endif 417#endif
diff --git a/drivers/ata/pata_hpt3x3.c b/drivers/ata/pata_hpt3x3.c
index 255c5aaff3a8..d019cdd5bc9f 100644
--- a/drivers/ata/pata_hpt3x3.c
+++ b/drivers/ata/pata_hpt3x3.c
@@ -249,7 +249,7 @@ static int hpt3x3_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
249 IRQF_SHARED, &hpt3x3_sht); 249 IRQF_SHARED, &hpt3x3_sht);
250} 250}
251 251
252#ifdef CONFIG_PM 252#ifdef CONFIG_PM_SLEEP
253static int hpt3x3_reinit_one(struct pci_dev *dev) 253static int hpt3x3_reinit_one(struct pci_dev *dev)
254{ 254{
255 struct ata_host *host = pci_get_drvdata(dev); 255 struct ata_host *host = pci_get_drvdata(dev);
@@ -277,7 +277,7 @@ static struct pci_driver hpt3x3_pci_driver = {
277 .id_table = hpt3x3, 277 .id_table = hpt3x3,
278 .probe = hpt3x3_init_one, 278 .probe = hpt3x3_init_one,
279 .remove = ata_pci_remove_one, 279 .remove = ata_pci_remove_one,
280#ifdef CONFIG_PM 280#ifdef CONFIG_PM_SLEEP
281 .suspend = ata_pci_device_suspend, 281 .suspend = ata_pci_device_suspend,
282 .resume = hpt3x3_reinit_one, 282 .resume = hpt3x3_reinit_one,
283#endif 283#endif
diff --git a/drivers/ata/pata_imx.c b/drivers/ata/pata_imx.c
index e0872db913d6..af424573c2ff 100644
--- a/drivers/ata/pata_imx.c
+++ b/drivers/ata/pata_imx.c
@@ -185,7 +185,7 @@ static int pata_imx_remove(struct platform_device *pdev)
185 return 0; 185 return 0;
186} 186}
187 187
188#ifdef CONFIG_PM 188#ifdef CONFIG_PM_SLEEP
189static int pata_imx_suspend(struct device *dev) 189static int pata_imx_suspend(struct device *dev)
190{ 190{
191 struct ata_host *host = dev_get_drvdata(dev); 191 struct ata_host *host = dev_get_drvdata(dev);
@@ -244,7 +244,7 @@ static struct platform_driver pata_imx_driver = {
244 .name = DRV_NAME, 244 .name = DRV_NAME,
245 .of_match_table = imx_pata_dt_ids, 245 .of_match_table = imx_pata_dt_ids,
246 .owner = THIS_MODULE, 246 .owner = THIS_MODULE,
247#ifdef CONFIG_PM 247#ifdef CONFIG_PM_SLEEP
248 .pm = &pata_imx_pm_ops, 248 .pm = &pata_imx_pm_ops,
249#endif 249#endif
250 }, 250 },
diff --git a/drivers/ata/pata_it8213.c b/drivers/ata/pata_it8213.c
index 81369d187a5c..4f97d1e52f85 100644
--- a/drivers/ata/pata_it8213.c
+++ b/drivers/ata/pata_it8213.c
@@ -283,7 +283,7 @@ static struct pci_driver it8213_pci_driver = {
283 .id_table = it8213_pci_tbl, 283 .id_table = it8213_pci_tbl,
284 .probe = it8213_init_one, 284 .probe = it8213_init_one,
285 .remove = ata_pci_remove_one, 285 .remove = ata_pci_remove_one,
286#ifdef CONFIG_PM 286#ifdef CONFIG_PM_SLEEP
287 .suspend = ata_pci_device_suspend, 287 .suspend = ata_pci_device_suspend,
288 .resume = ata_pci_device_resume, 288 .resume = ata_pci_device_resume,
289#endif 289#endif
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index dc3d7877f29d..a5088ecb349f 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -935,7 +935,7 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
935 return ata_pci_bmdma_init_one(pdev, ppi, &it821x_sht, NULL, 0); 935 return ata_pci_bmdma_init_one(pdev, ppi, &it821x_sht, NULL, 0);
936} 936}
937 937
938#ifdef CONFIG_PM 938#ifdef CONFIG_PM_SLEEP
939static int it821x_reinit_one(struct pci_dev *pdev) 939static int it821x_reinit_one(struct pci_dev *pdev)
940{ 940{
941 struct ata_host *host = pci_get_drvdata(pdev); 941 struct ata_host *host = pci_get_drvdata(pdev);
@@ -965,7 +965,7 @@ static struct pci_driver it821x_pci_driver = {
965 .id_table = it821x, 965 .id_table = it821x,
966 .probe = it821x_init_one, 966 .probe = it821x_init_one,
967 .remove = ata_pci_remove_one, 967 .remove = ata_pci_remove_one,
968#ifdef CONFIG_PM 968#ifdef CONFIG_PM_SLEEP
969 .suspend = ata_pci_device_suspend, 969 .suspend = ata_pci_device_suspend,
970 .resume = it821x_reinit_one, 970 .resume = it821x_reinit_one,
971#endif 971#endif
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c
index b1cfa0258fd3..4d1a5d2c4287 100644
--- a/drivers/ata/pata_jmicron.c
+++ b/drivers/ata/pata_jmicron.c
@@ -157,7 +157,7 @@ static struct pci_driver jmicron_pci_driver = {
157 .id_table = jmicron_pci_tbl, 157 .id_table = jmicron_pci_tbl,
158 .probe = jmicron_init_one, 158 .probe = jmicron_init_one,
159 .remove = ata_pci_remove_one, 159 .remove = ata_pci_remove_one,
160#ifdef CONFIG_PM 160#ifdef CONFIG_PM_SLEEP
161 .suspend = ata_pci_device_suspend, 161 .suspend = ata_pci_device_suspend,
162 .resume = ata_pci_device_resume, 162 .resume = ata_pci_device_resume,
163#endif 163#endif
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c
index c28d0645e851..a02f76fdcfcd 100644
--- a/drivers/ata/pata_macio.c
+++ b/drivers/ata/pata_macio.c
@@ -845,8 +845,7 @@ static int pata_macio_slave_config(struct scsi_device *sdev)
845 return 0; 845 return 0;
846} 846}
847 847
848#ifdef CONFIG_PM 848#ifdef CONFIG_PM_SLEEP
849
850static int pata_macio_do_suspend(struct pata_macio_priv *priv, pm_message_t mesg) 849static int pata_macio_do_suspend(struct pata_macio_priv *priv, pm_message_t mesg)
851{ 850{
852 int rc; 851 int rc;
@@ -907,8 +906,7 @@ static int pata_macio_do_resume(struct pata_macio_priv *priv)
907 906
908 return 0; 907 return 0;
909} 908}
910 909#endif /* CONFIG_PM_SLEEP */
911#endif /* CONFIG_PM */
912 910
913static struct scsi_host_template pata_macio_sht = { 911static struct scsi_host_template pata_macio_sht = {
914 ATA_BASE_SHT(DRV_NAME), 912 ATA_BASE_SHT(DRV_NAME),
@@ -1208,8 +1206,7 @@ static int pata_macio_detach(struct macio_dev *mdev)
1208 return 0; 1206 return 0;
1209} 1207}
1210 1208
1211#ifdef CONFIG_PM 1209#ifdef CONFIG_PM_SLEEP
1212
1213static int pata_macio_suspend(struct macio_dev *mdev, pm_message_t mesg) 1210static int pata_macio_suspend(struct macio_dev *mdev, pm_message_t mesg)
1214{ 1211{
1215 struct ata_host *host = macio_get_drvdata(mdev); 1212 struct ata_host *host = macio_get_drvdata(mdev);
@@ -1223,8 +1220,7 @@ static int pata_macio_resume(struct macio_dev *mdev)
1223 1220
1224 return pata_macio_do_resume(host->private_data); 1221 return pata_macio_do_resume(host->private_data);
1225} 1222}
1226 1223#endif /* CONFIG_PM_SLEEP */
1227#endif /* CONFIG_PM */
1228 1224
1229#ifdef CONFIG_PMAC_MEDIABAY 1225#ifdef CONFIG_PMAC_MEDIABAY
1230static void pata_macio_mb_event(struct macio_dev* mdev, int mb_state) 1226static void pata_macio_mb_event(struct macio_dev* mdev, int mb_state)
@@ -1316,8 +1312,7 @@ static void pata_macio_pci_detach(struct pci_dev *pdev)
1316 ata_host_detach(host); 1312 ata_host_detach(host);
1317} 1313}
1318 1314
1319#ifdef CONFIG_PM 1315#ifdef CONFIG_PM_SLEEP
1320
1321static int pata_macio_pci_suspend(struct pci_dev *pdev, pm_message_t mesg) 1316static int pata_macio_pci_suspend(struct pci_dev *pdev, pm_message_t mesg)
1322{ 1317{
1323 struct ata_host *host = pci_get_drvdata(pdev); 1318 struct ata_host *host = pci_get_drvdata(pdev);
@@ -1331,8 +1326,7 @@ static int pata_macio_pci_resume(struct pci_dev *pdev)
1331 1326
1332 return pata_macio_do_resume(host->private_data); 1327 return pata_macio_do_resume(host->private_data);
1333} 1328}
1334 1329#endif /* CONFIG_PM_SLEEP */
1335#endif /* CONFIG_PM */
1336 1330
1337static struct of_device_id pata_macio_match[] = 1331static struct of_device_id pata_macio_match[] =
1338{ 1332{
@@ -1360,7 +1354,7 @@ static struct macio_driver pata_macio_driver =
1360 }, 1354 },
1361 .probe = pata_macio_attach, 1355 .probe = pata_macio_attach,
1362 .remove = pata_macio_detach, 1356 .remove = pata_macio_detach,
1363#ifdef CONFIG_PM 1357#ifdef CONFIG_PM_SLEEP
1364 .suspend = pata_macio_suspend, 1358 .suspend = pata_macio_suspend,
1365 .resume = pata_macio_resume, 1359 .resume = pata_macio_resume,
1366#endif 1360#endif
@@ -1383,7 +1377,7 @@ static struct pci_driver pata_macio_pci_driver = {
1383 .id_table = pata_macio_pci_match, 1377 .id_table = pata_macio_pci_match,
1384 .probe = pata_macio_pci_attach, 1378 .probe = pata_macio_pci_attach,
1385 .remove = pata_macio_pci_detach, 1379 .remove = pata_macio_pci_detach,
1386#ifdef CONFIG_PM 1380#ifdef CONFIG_PM_SLEEP
1387 .suspend = pata_macio_pci_suspend, 1381 .suspend = pata_macio_pci_suspend,
1388 .resume = pata_macio_pci_resume, 1382 .resume = pata_macio_pci_resume,
1389#endif 1383#endif
diff --git a/drivers/ata/pata_marvell.c b/drivers/ata/pata_marvell.c
index 6bad3df3a13c..ae9feb1ba8f7 100644
--- a/drivers/ata/pata_marvell.c
+++ b/drivers/ata/pata_marvell.c
@@ -171,7 +171,7 @@ static struct pci_driver marvell_pci_driver = {
171 .id_table = marvell_pci_tbl, 171 .id_table = marvell_pci_tbl,
172 .probe = marvell_init_one, 172 .probe = marvell_init_one,
173 .remove = ata_pci_remove_one, 173 .remove = ata_pci_remove_one,
174#ifdef CONFIG_PM 174#ifdef CONFIG_PM_SLEEP
175 .suspend = ata_pci_device_suspend, 175 .suspend = ata_pci_device_suspend,
176 .resume = ata_pci_device_resume, 176 .resume = ata_pci_device_resume,
177#endif 177#endif
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index 0024ced3e200..ccd1c83a05cc 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -819,9 +819,7 @@ mpc52xx_ata_remove(struct platform_device *op)
819 return 0; 819 return 0;
820} 820}
821 821
822 822#ifdef CONFIG_PM_SLEEP
823#ifdef CONFIG_PM
824
825static int 823static int
826mpc52xx_ata_suspend(struct platform_device *op, pm_message_t state) 824mpc52xx_ata_suspend(struct platform_device *op, pm_message_t state)
827{ 825{
@@ -847,10 +845,8 @@ mpc52xx_ata_resume(struct platform_device *op)
847 845
848 return 0; 846 return 0;
849} 847}
850
851#endif 848#endif
852 849
853
854static struct of_device_id mpc52xx_ata_of_match[] = { 850static struct of_device_id mpc52xx_ata_of_match[] = {
855 { .compatible = "fsl,mpc5200-ata", }, 851 { .compatible = "fsl,mpc5200-ata", },
856 { .compatible = "mpc5200-ata", }, 852 { .compatible = "mpc5200-ata", },
@@ -861,7 +857,7 @@ static struct of_device_id mpc52xx_ata_of_match[] = {
861static struct platform_driver mpc52xx_ata_of_platform_driver = { 857static struct platform_driver mpc52xx_ata_of_platform_driver = {
862 .probe = mpc52xx_ata_probe, 858 .probe = mpc52xx_ata_probe,
863 .remove = mpc52xx_ata_remove, 859 .remove = mpc52xx_ata_remove,
864#ifdef CONFIG_PM 860#ifdef CONFIG_PM_SLEEP
865 .suspend = mpc52xx_ata_suspend, 861 .suspend = mpc52xx_ata_suspend,
866 .resume = mpc52xx_ata_resume, 862 .resume = mpc52xx_ata_resume,
867#endif 863#endif
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c
index f39a5379e816..202b4d601393 100644
--- a/drivers/ata/pata_mpiix.c
+++ b/drivers/ata/pata_mpiix.c
@@ -223,7 +223,7 @@ static struct pci_driver mpiix_pci_driver = {
223 .id_table = mpiix, 223 .id_table = mpiix,
224 .probe = mpiix_init_one, 224 .probe = mpiix_init_one,
225 .remove = ata_pci_remove_one, 225 .remove = ata_pci_remove_one,
226#ifdef CONFIG_PM 226#ifdef CONFIG_PM_SLEEP
227 .suspend = ata_pci_device_suspend, 227 .suspend = ata_pci_device_suspend,
228 .resume = ata_pci_device_resume, 228 .resume = ata_pci_device_resume,
229#endif 229#endif
diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c
index e3b97093ef9a..0ea18331d466 100644
--- a/drivers/ata/pata_netcell.c
+++ b/drivers/ata/pata_netcell.c
@@ -92,7 +92,7 @@ static struct pci_driver netcell_pci_driver = {
92 .id_table = netcell_pci_tbl, 92 .id_table = netcell_pci_tbl,
93 .probe = netcell_init_one, 93 .probe = netcell_init_one,
94 .remove = ata_pci_remove_one, 94 .remove = ata_pci_remove_one,
95#ifdef CONFIG_PM 95#ifdef CONFIG_PM_SLEEP
96 .suspend = ata_pci_device_suspend, 96 .suspend = ata_pci_device_suspend,
97 .resume = ata_pci_device_resume, 97 .resume = ata_pci_device_resume,
98#endif 98#endif
diff --git a/drivers/ata/pata_ninja32.c b/drivers/ata/pata_ninja32.c
index 56201a69af12..efb272da8567 100644
--- a/drivers/ata/pata_ninja32.c
+++ b/drivers/ata/pata_ninja32.c
@@ -152,8 +152,7 @@ static int ninja32_init_one(struct pci_dev *dev, const struct pci_device_id *id)
152 IRQF_SHARED, &ninja32_sht); 152 IRQF_SHARED, &ninja32_sht);
153} 153}
154 154
155#ifdef CONFIG_PM 155#ifdef CONFIG_PM_SLEEP
156
157static int ninja32_reinit_one(struct pci_dev *pdev) 156static int ninja32_reinit_one(struct pci_dev *pdev)
158{ 157{
159 struct ata_host *host = pci_get_drvdata(pdev); 158 struct ata_host *host = pci_get_drvdata(pdev);
@@ -183,7 +182,7 @@ static struct pci_driver ninja32_pci_driver = {
183 .id_table = ninja32, 182 .id_table = ninja32,
184 .probe = ninja32_init_one, 183 .probe = ninja32_init_one,
185 .remove = ata_pci_remove_one, 184 .remove = ata_pci_remove_one,
186#ifdef CONFIG_PM 185#ifdef CONFIG_PM_SLEEP
187 .suspend = ata_pci_device_suspend, 186 .suspend = ata_pci_device_suspend,
188 .resume = ninja32_reinit_one, 187 .resume = ninja32_reinit_one,
189#endif 188#endif
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c
index 6154c3ee11a5..200e1eb23a20 100644
--- a/drivers/ata/pata_ns87410.c
+++ b/drivers/ata/pata_ns87410.c
@@ -161,7 +161,7 @@ static struct pci_driver ns87410_pci_driver = {
161 .id_table = ns87410, 161 .id_table = ns87410,
162 .probe = ns87410_init_one, 162 .probe = ns87410_init_one,
163 .remove = ata_pci_remove_one, 163 .remove = ata_pci_remove_one,
164#ifdef CONFIG_PM 164#ifdef CONFIG_PM_SLEEP
165 .suspend = ata_pci_device_suspend, 165 .suspend = ata_pci_device_suspend,
166 .resume = ata_pci_device_resume, 166 .resume = ata_pci_device_resume,
167#endif 167#endif
diff --git a/drivers/ata/pata_ns87415.c b/drivers/ata/pata_ns87415.c
index d44df7ccfe43..84c6b225b56e 100644
--- a/drivers/ata/pata_ns87415.c
+++ b/drivers/ata/pata_ns87415.c
@@ -385,7 +385,7 @@ static const struct pci_device_id ns87415_pci_tbl[] = {
385 { } /* terminate list */ 385 { } /* terminate list */
386}; 386};
387 387
388#ifdef CONFIG_PM 388#ifdef CONFIG_PM_SLEEP
389static int ns87415_reinit_one(struct pci_dev *pdev) 389static int ns87415_reinit_one(struct pci_dev *pdev)
390{ 390{
391 struct ata_host *host = pci_get_drvdata(pdev); 391 struct ata_host *host = pci_get_drvdata(pdev);
@@ -407,7 +407,7 @@ static struct pci_driver ns87415_pci_driver = {
407 .id_table = ns87415_pci_tbl, 407 .id_table = ns87415_pci_tbl,
408 .probe = ns87415_init_one, 408 .probe = ns87415_init_one,
409 .remove = ata_pci_remove_one, 409 .remove = ata_pci_remove_one,
410#ifdef CONFIG_PM 410#ifdef CONFIG_PM_SLEEP
411 .suspend = ata_pci_device_suspend, 411 .suspend = ata_pci_device_suspend,
412 .resume = ns87415_reinit_one, 412 .resume = ns87415_reinit_one,
413#endif 413#endif
diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c
index 319b64491b7b..b9bf78b7d48d 100644
--- a/drivers/ata/pata_oldpiix.c
+++ b/drivers/ata/pata_oldpiix.c
@@ -258,7 +258,7 @@ static struct pci_driver oldpiix_pci_driver = {
258 .id_table = oldpiix_pci_tbl, 258 .id_table = oldpiix_pci_tbl,
259 .probe = oldpiix_init_one, 259 .probe = oldpiix_init_one,
260 .remove = ata_pci_remove_one, 260 .remove = ata_pci_remove_one,
261#ifdef CONFIG_PM 261#ifdef CONFIG_PM_SLEEP
262 .suspend = ata_pci_device_suspend, 262 .suspend = ata_pci_device_suspend,
263 .resume = ata_pci_device_resume, 263 .resume = ata_pci_device_resume,
264#endif 264#endif
diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c
index fb042e0519d0..3a944a029264 100644
--- a/drivers/ata/pata_opti.c
+++ b/drivers/ata/pata_opti.c
@@ -184,7 +184,7 @@ static struct pci_driver opti_pci_driver = {
184 .id_table = opti, 184 .id_table = opti,
185 .probe = opti_init_one, 185 .probe = opti_init_one,
186 .remove = ata_pci_remove_one, 186 .remove = ata_pci_remove_one,
187#ifdef CONFIG_PM 187#ifdef CONFIG_PM_SLEEP
188 .suspend = ata_pci_device_suspend, 188 .suspend = ata_pci_device_suspend,
189 .resume = ata_pci_device_resume, 189 .resume = ata_pci_device_resume,
190#endif 190#endif
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c
index bb71ea214b99..bdec7efa4643 100644
--- a/drivers/ata/pata_optidma.c
+++ b/drivers/ata/pata_optidma.c
@@ -440,7 +440,7 @@ static struct pci_driver optidma_pci_driver = {
440 .id_table = optidma, 440 .id_table = optidma,
441 .probe = optidma_init_one, 441 .probe = optidma_init_one,
442 .remove = ata_pci_remove_one, 442 .remove = ata_pci_remove_one,
443#ifdef CONFIG_PM 443#ifdef CONFIG_PM_SLEEP
444 .suspend = ata_pci_device_suspend, 444 .suspend = ata_pci_device_suspend,
445 .resume = ata_pci_device_resume, 445 .resume = ata_pci_device_resume,
446#endif 446#endif
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c
index 1151f23177bb..4d06a5cda987 100644
--- a/drivers/ata/pata_pdc2027x.c
+++ b/drivers/ata/pata_pdc2027x.c
@@ -62,7 +62,7 @@ enum {
62}; 62};
63 63
64static int pdc2027x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); 64static int pdc2027x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
65#ifdef CONFIG_PM 65#ifdef CONFIG_PM_SLEEP
66static int pdc2027x_reinit_one(struct pci_dev *pdev); 66static int pdc2027x_reinit_one(struct pci_dev *pdev);
67#endif 67#endif
68static int pdc2027x_prereset(struct ata_link *link, unsigned long deadline); 68static int pdc2027x_prereset(struct ata_link *link, unsigned long deadline);
@@ -128,7 +128,7 @@ static struct pci_driver pdc2027x_pci_driver = {
128 .id_table = pdc2027x_pci_tbl, 128 .id_table = pdc2027x_pci_tbl,
129 .probe = pdc2027x_init_one, 129 .probe = pdc2027x_init_one,
130 .remove = ata_pci_remove_one, 130 .remove = ata_pci_remove_one,
131#ifdef CONFIG_PM 131#ifdef CONFIG_PM_SLEEP
132 .suspend = ata_pci_device_suspend, 132 .suspend = ata_pci_device_suspend,
133 .resume = pdc2027x_reinit_one, 133 .resume = pdc2027x_reinit_one,
134#endif 134#endif
@@ -761,7 +761,7 @@ static int pdc2027x_init_one(struct pci_dev *pdev,
761 IRQF_SHARED, &pdc2027x_sht); 761 IRQF_SHARED, &pdc2027x_sht);
762} 762}
763 763
764#ifdef CONFIG_PM 764#ifdef CONFIG_PM_SLEEP
765static int pdc2027x_reinit_one(struct pci_dev *pdev) 765static int pdc2027x_reinit_one(struct pci_dev *pdev)
766{ 766{
767 struct ata_host *host = pci_get_drvdata(pdev); 767 struct ata_host *host = pci_get_drvdata(pdev);
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c
index defa050e1784..9001991d2830 100644
--- a/drivers/ata/pata_pdc202xx_old.c
+++ b/drivers/ata/pata_pdc202xx_old.c
@@ -377,7 +377,7 @@ static struct pci_driver pdc202xx_pci_driver = {
377 .id_table = pdc202xx, 377 .id_table = pdc202xx,
378 .probe = pdc202xx_init_one, 378 .probe = pdc202xx_init_one,
379 .remove = ata_pci_remove_one, 379 .remove = ata_pci_remove_one,
380#ifdef CONFIG_PM 380#ifdef CONFIG_PM_SLEEP
381 .suspend = ata_pci_device_suspend, 381 .suspend = ata_pci_device_suspend,
382 .resume = ata_pci_device_resume, 382 .resume = ata_pci_device_resume,
383#endif 383#endif
diff --git a/drivers/ata/pata_piccolo.c b/drivers/ata/pata_piccolo.c
index 0b46be117051..35cb0e263237 100644
--- a/drivers/ata/pata_piccolo.c
+++ b/drivers/ata/pata_piccolo.c
@@ -110,7 +110,7 @@ static struct pci_driver ata_tosh_pci_driver = {
110 .id_table = ata_tosh, 110 .id_table = ata_tosh,
111 .probe = ata_tosh_init_one, 111 .probe = ata_tosh_init_one,
112 .remove = ata_pci_remove_one, 112 .remove = ata_pci_remove_one,
113#ifdef CONFIG_PM 113#ifdef CONFIG_PM_SLEEP
114 .suspend = ata_pci_device_suspend, 114 .suspend = ata_pci_device_suspend,
115 .resume = ata_pci_device_resume, 115 .resume = ata_pci_device_resume,
116#endif 116#endif
diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c
index be3f10240dca..a3f1123d17aa 100644
--- a/drivers/ata/pata_radisys.c
+++ b/drivers/ata/pata_radisys.c
@@ -237,7 +237,7 @@ static struct pci_driver radisys_pci_driver = {
237 .id_table = radisys_pci_tbl, 237 .id_table = radisys_pci_tbl,
238 .probe = radisys_init_one, 238 .probe = radisys_init_one,
239 .remove = ata_pci_remove_one, 239 .remove = ata_pci_remove_one,
240#ifdef CONFIG_PM 240#ifdef CONFIG_PM_SLEEP
241 .suspend = ata_pci_device_suspend, 241 .suspend = ata_pci_device_suspend,
242 .resume = ata_pci_device_resume, 242 .resume = ata_pci_device_resume,
243#endif 243#endif
diff --git a/drivers/ata/pata_rdc.c b/drivers/ata/pata_rdc.c
index 521b2137ea3e..9ce5952216bc 100644
--- a/drivers/ata/pata_rdc.c
+++ b/drivers/ata/pata_rdc.c
@@ -382,7 +382,7 @@ static struct pci_driver rdc_pci_driver = {
382 .id_table = rdc_pci_tbl, 382 .id_table = rdc_pci_tbl,
383 .probe = rdc_init_one, 383 .probe = rdc_init_one,
384 .remove = rdc_remove_one, 384 .remove = rdc_remove_one,
385#ifdef CONFIG_PM 385#ifdef CONFIG_PM_SLEEP
386 .suspend = ata_pci_device_suspend, 386 .suspend = ata_pci_device_suspend,
387 .resume = ata_pci_device_resume, 387 .resume = ata_pci_device_resume,
388#endif 388#endif
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c
index caedc90855b2..b3ec18c6bcc6 100644
--- a/drivers/ata/pata_rz1000.c
+++ b/drivers/ata/pata_rz1000.c
@@ -101,7 +101,7 @@ static int rz1000_init_one (struct pci_dev *pdev, const struct pci_device_id *en
101 return -ENODEV; 101 return -ENODEV;
102} 102}
103 103
104#ifdef CONFIG_PM 104#ifdef CONFIG_PM_SLEEP
105static int rz1000_reinit_one(struct pci_dev *pdev) 105static int rz1000_reinit_one(struct pci_dev *pdev)
106{ 106{
107 struct ata_host *host = pci_get_drvdata(pdev); 107 struct ata_host *host = pci_get_drvdata(pdev);
@@ -133,7 +133,7 @@ static struct pci_driver rz1000_pci_driver = {
133 .id_table = pata_rz1000, 133 .id_table = pata_rz1000,
134 .probe = rz1000_init_one, 134 .probe = rz1000_init_one,
135 .remove = ata_pci_remove_one, 135 .remove = ata_pci_remove_one,
136#ifdef CONFIG_PM 136#ifdef CONFIG_PM_SLEEP
137 .suspend = ata_pci_device_suspend, 137 .suspend = ata_pci_device_suspend,
138 .resume = rz1000_reinit_one, 138 .resume = rz1000_reinit_one,
139#endif 139#endif
diff --git a/drivers/ata/pata_samsung_cf.c b/drivers/ata/pata_samsung_cf.c
index a79566d05666..cab8e6024b42 100644
--- a/drivers/ata/pata_samsung_cf.c
+++ b/drivers/ata/pata_samsung_cf.c
@@ -615,7 +615,7 @@ static int __exit pata_s3c_remove(struct platform_device *pdev)
615 return 0; 615 return 0;
616} 616}
617 617
618#ifdef CONFIG_PM 618#ifdef CONFIG_PM_SLEEP
619static int pata_s3c_suspend(struct device *dev) 619static int pata_s3c_suspend(struct device *dev)
620{ 620{
621 struct platform_device *pdev = to_platform_device(dev); 621 struct platform_device *pdev = to_platform_device(dev);
@@ -666,7 +666,7 @@ static struct platform_driver pata_s3c_driver = {
666 .driver = { 666 .driver = {
667 .name = DRV_NAME, 667 .name = DRV_NAME,
668 .owner = THIS_MODULE, 668 .owner = THIS_MODULE,
669#ifdef CONFIG_PM 669#ifdef CONFIG_PM_SLEEP
670 .pm = &pata_s3c_pm_ops, 670 .pm = &pata_s3c_pm_ops,
671#endif 671#endif
672 }, 672 },
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c
index 96a232fffae6..c71de5d680d1 100644
--- a/drivers/ata/pata_sc1200.c
+++ b/drivers/ata/pata_sc1200.c
@@ -254,7 +254,7 @@ static struct pci_driver sc1200_pci_driver = {
254 .id_table = sc1200, 254 .id_table = sc1200,
255 .probe = sc1200_init_one, 255 .probe = sc1200_init_one,
256 .remove = ata_pci_remove_one, 256 .remove = ata_pci_remove_one,
257#ifdef CONFIG_PM 257#ifdef CONFIG_PM_SLEEP
258 .suspend = ata_pci_device_suspend, 258 .suspend = ata_pci_device_suspend,
259 .resume = ata_pci_device_resume, 259 .resume = ata_pci_device_resume,
260#endif 260#endif
diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
index f1f5b5ae3382..4e006d74bef8 100644
--- a/drivers/ata/pata_scc.c
+++ b/drivers/ata/pata_scc.c
@@ -1096,7 +1096,7 @@ static struct pci_driver scc_pci_driver = {
1096 .id_table = scc_pci_tbl, 1096 .id_table = scc_pci_tbl,
1097 .probe = scc_init_one, 1097 .probe = scc_init_one,
1098 .remove = ata_pci_remove_one, 1098 .remove = ata_pci_remove_one,
1099#ifdef CONFIG_PM 1099#ifdef CONFIG_PM_SLEEP
1100 .suspend = ata_pci_device_suspend, 1100 .suspend = ata_pci_device_suspend,
1101 .resume = ata_pci_device_resume, 1101 .resume = ata_pci_device_resume,
1102#endif 1102#endif
diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c
index 5a1cde0ea360..b920c3407f8b 100644
--- a/drivers/ata/pata_sch.c
+++ b/drivers/ata/pata_sch.c
@@ -64,7 +64,7 @@ static struct pci_driver sch_pci_driver = {
64 .id_table = sch_pci_tbl, 64 .id_table = sch_pci_tbl,
65 .probe = sch_init_one, 65 .probe = sch_init_one,
66 .remove = ata_pci_remove_one, 66 .remove = ata_pci_remove_one,
67#ifdef CONFIG_PM 67#ifdef CONFIG_PM_SLEEP
68 .suspend = ata_pci_device_suspend, 68 .suspend = ata_pci_device_suspend,
69 .resume = ata_pci_device_resume, 69 .resume = ata_pci_device_resume,
70#endif 70#endif
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index e27f31fe1b67..fc5f31d4828e 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -436,7 +436,7 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id
436 return ata_pci_bmdma_init_one(pdev, ppi, &serverworks_sht, NULL, 0); 436 return ata_pci_bmdma_init_one(pdev, ppi, &serverworks_sht, NULL, 0);
437} 437}
438 438
439#ifdef CONFIG_PM 439#ifdef CONFIG_PM_SLEEP
440static int serverworks_reinit_one(struct pci_dev *pdev) 440static int serverworks_reinit_one(struct pci_dev *pdev)
441{ 441{
442 struct ata_host *host = pci_get_drvdata(pdev); 442 struct ata_host *host = pci_get_drvdata(pdev);
@@ -468,7 +468,7 @@ static struct pci_driver serverworks_pci_driver = {
468 .id_table = serverworks, 468 .id_table = serverworks,
469 .probe = serverworks_init_one, 469 .probe = serverworks_init_one,
470 .remove = ata_pci_remove_one, 470 .remove = ata_pci_remove_one,
471#ifdef CONFIG_PM 471#ifdef CONFIG_PM_SLEEP
472 .suspend = ata_pci_device_suspend, 472 .suspend = ata_pci_device_suspend,
473 .resume = serverworks_reinit_one, 473 .resume = serverworks_reinit_one,
474#endif 474#endif
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c
index 73fe362d9716..f597edccedec 100644
--- a/drivers/ata/pata_sil680.c
+++ b/drivers/ata/pata_sil680.c
@@ -403,7 +403,7 @@ use_ioports:
403 return ata_pci_bmdma_init_one(pdev, ppi, &sil680_sht, NULL, 0); 403 return ata_pci_bmdma_init_one(pdev, ppi, &sil680_sht, NULL, 0);
404} 404}
405 405
406#ifdef CONFIG_PM 406#ifdef CONFIG_PM_SLEEP
407static int sil680_reinit_one(struct pci_dev *pdev) 407static int sil680_reinit_one(struct pci_dev *pdev)
408{ 408{
409 struct ata_host *host = pci_get_drvdata(pdev); 409 struct ata_host *host = pci_get_drvdata(pdev);
@@ -429,7 +429,7 @@ static struct pci_driver sil680_pci_driver = {
429 .id_table = sil680, 429 .id_table = sil680,
430 .probe = sil680_init_one, 430 .probe = sil680_init_one,
431 .remove = ata_pci_remove_one, 431 .remove = ata_pci_remove_one,
432#ifdef CONFIG_PM 432#ifdef CONFIG_PM_SLEEP
433 .suspend = ata_pci_device_suspend, 433 .suspend = ata_pci_device_suspend,
434 .resume = sil680_reinit_one, 434 .resume = sil680_reinit_one,
435#endif 435#endif
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index 78d913aa93c8..626f989d5c6a 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -869,7 +869,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
869 return ata_pci_bmdma_init_one(pdev, ppi, &sis_sht, chipset, 0); 869 return ata_pci_bmdma_init_one(pdev, ppi, &sis_sht, chipset, 0);
870} 870}
871 871
872#ifdef CONFIG_PM 872#ifdef CONFIG_PM_SLEEP
873static int sis_reinit_one(struct pci_dev *pdev) 873static int sis_reinit_one(struct pci_dev *pdev)
874{ 874{
875 struct ata_host *host = pci_get_drvdata(pdev); 875 struct ata_host *host = pci_get_drvdata(pdev);
@@ -899,7 +899,7 @@ static struct pci_driver sis_pci_driver = {
899 .id_table = sis_pci_tbl, 899 .id_table = sis_pci_tbl,
900 .probe = sis_init_one, 900 .probe = sis_init_one,
901 .remove = ata_pci_remove_one, 901 .remove = ata_pci_remove_one,
902#ifdef CONFIG_PM 902#ifdef CONFIG_PM_SLEEP
903 .suspend = ata_pci_device_suspend, 903 .suspend = ata_pci_device_suspend,
904 .resume = sis_reinit_one, 904 .resume = sis_reinit_one,
905#endif 905#endif
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c
index 900f0e4a1faf..4935f61f629c 100644
--- a/drivers/ata/pata_sl82c105.c
+++ b/drivers/ata/pata_sl82c105.c
@@ -337,7 +337,7 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id
337 return ata_pci_bmdma_init_one(dev, ppi, &sl82c105_sht, NULL, 0); 337 return ata_pci_bmdma_init_one(dev, ppi, &sl82c105_sht, NULL, 0);
338} 338}
339 339
340#ifdef CONFIG_PM 340#ifdef CONFIG_PM_SLEEP
341static int sl82c105_reinit_one(struct pci_dev *pdev) 341static int sl82c105_reinit_one(struct pci_dev *pdev)
342{ 342{
343 struct ata_host *host = pci_get_drvdata(pdev); 343 struct ata_host *host = pci_get_drvdata(pdev);
@@ -365,7 +365,7 @@ static struct pci_driver sl82c105_pci_driver = {
365 .id_table = sl82c105, 365 .id_table = sl82c105,
366 .probe = sl82c105_init_one, 366 .probe = sl82c105_init_one,
367 .remove = ata_pci_remove_one, 367 .remove = ata_pci_remove_one,
368#ifdef CONFIG_PM 368#ifdef CONFIG_PM_SLEEP
369 .suspend = ata_pci_device_suspend, 369 .suspend = ata_pci_device_suspend,
370 .resume = sl82c105_reinit_one, 370 .resume = sl82c105_reinit_one,
371#endif 371#endif
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c
index 7bc78e264f9e..d9364af8eb63 100644
--- a/drivers/ata/pata_triflex.c
+++ b/drivers/ata/pata_triflex.c
@@ -207,7 +207,7 @@ static const struct pci_device_id triflex[] = {
207 { }, 207 { },
208}; 208};
209 209
210#ifdef CONFIG_PM 210#ifdef CONFIG_PM_SLEEP
211static int triflex_ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg) 211static int triflex_ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
212{ 212{
213 struct ata_host *host = pci_get_drvdata(pdev); 213 struct ata_host *host = pci_get_drvdata(pdev);
@@ -233,7 +233,7 @@ static struct pci_driver triflex_pci_driver = {
233 .id_table = triflex, 233 .id_table = triflex,
234 .probe = triflex_init_one, 234 .probe = triflex_init_one,
235 .remove = ata_pci_remove_one, 235 .remove = ata_pci_remove_one,
236#ifdef CONFIG_PM 236#ifdef CONFIG_PM_SLEEP
237 .suspend = triflex_ata_pci_device_suspend, 237 .suspend = triflex_ata_pci_device_suspend,
238 .resume = ata_pci_device_resume, 238 .resume = ata_pci_device_resume,
239#endif 239#endif
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index f6c9632bdff6..1ca6bcab369f 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -659,7 +659,7 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
659 return ata_pci_bmdma_init_one(pdev, ppi, &via_sht, (void *)config, 0); 659 return ata_pci_bmdma_init_one(pdev, ppi, &via_sht, (void *)config, 0);
660} 660}
661 661
662#ifdef CONFIG_PM 662#ifdef CONFIG_PM_SLEEP
663/** 663/**
664 * via_reinit_one - reinit after resume 664 * via_reinit_one - reinit after resume
665 * @pdev; PCI device 665 * @pdev; PCI device
@@ -704,7 +704,7 @@ static struct pci_driver via_pci_driver = {
704 .id_table = via, 704 .id_table = via,
705 .probe = via_init_one, 705 .probe = via_init_one,
706 .remove = ata_pci_remove_one, 706 .remove = ata_pci_remove_one,
707#ifdef CONFIG_PM 707#ifdef CONFIG_PM_SLEEP
708 .suspend = ata_pci_device_suspend, 708 .suspend = ata_pci_device_suspend,
709 .resume = via_reinit_one, 709 .resume = via_reinit_one,
710#endif 710#endif
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index fb0b40a191c2..e8f150e45446 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1588,7 +1588,7 @@ static int sata_fsl_remove(struct platform_device *ofdev)
1588 return 0; 1588 return 0;
1589} 1589}
1590 1590
1591#ifdef CONFIG_PM 1591#ifdef CONFIG_PM_SLEEP
1592static int sata_fsl_suspend(struct platform_device *op, pm_message_t state) 1592static int sata_fsl_suspend(struct platform_device *op, pm_message_t state)
1593{ 1593{
1594 struct ata_host *host = platform_get_drvdata(op); 1594 struct ata_host *host = platform_get_drvdata(op);
@@ -1644,7 +1644,7 @@ static struct platform_driver fsl_sata_driver = {
1644 }, 1644 },
1645 .probe = sata_fsl_probe, 1645 .probe = sata_fsl_probe,
1646 .remove = sata_fsl_remove, 1646 .remove = sata_fsl_remove,
1647#ifdef CONFIG_PM 1647#ifdef CONFIG_PM_SLEEP
1648 .suspend = sata_fsl_suspend, 1648 .suspend = sata_fsl_suspend,
1649 .resume = sata_fsl_resume, 1649 .resume = sata_fsl_resume,
1650#endif 1650#endif
diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c
index 5c54d957370a..069827826b20 100644
--- a/drivers/ata/sata_inic162x.c
+++ b/drivers/ata/sata_inic162x.c
@@ -785,7 +785,7 @@ static int init_controller(void __iomem *mmio_base, u16 hctl)
785 return 0; 785 return 0;
786} 786}
787 787
788#ifdef CONFIG_PM 788#ifdef CONFIG_PM_SLEEP
789static int inic_pci_device_resume(struct pci_dev *pdev) 789static int inic_pci_device_resume(struct pci_dev *pdev)
790{ 790{
791 struct ata_host *host = pci_get_drvdata(pdev); 791 struct ata_host *host = pci_get_drvdata(pdev);
@@ -898,7 +898,7 @@ static const struct pci_device_id inic_pci_tbl[] = {
898static struct pci_driver inic_pci_driver = { 898static struct pci_driver inic_pci_driver = {
899 .name = DRV_NAME, 899 .name = DRV_NAME,
900 .id_table = inic_pci_tbl, 900 .id_table = inic_pci_tbl,
901#ifdef CONFIG_PM 901#ifdef CONFIG_PM_SLEEP
902 .suspend = ata_pci_device_suspend, 902 .suspend = ata_pci_device_suspend,
903 .resume = inic_pci_device_resume, 903 .resume = inic_pci_device_resume,
904#endif 904#endif
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 05c8a44adf8e..391cfda1e83f 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -4222,7 +4222,7 @@ static int mv_platform_remove(struct platform_device *pdev)
4222 return 0; 4222 return 0;
4223} 4223}
4224 4224
4225#ifdef CONFIG_PM 4225#ifdef CONFIG_PM_SLEEP
4226static int mv_platform_suspend(struct platform_device *pdev, pm_message_t state) 4226static int mv_platform_suspend(struct platform_device *pdev, pm_message_t state)
4227{ 4227{
4228 struct ata_host *host = platform_get_drvdata(pdev); 4228 struct ata_host *host = platform_get_drvdata(pdev);
@@ -4289,7 +4289,7 @@ static struct platform_driver mv_platform_driver = {
4289#ifdef CONFIG_PCI 4289#ifdef CONFIG_PCI
4290static int mv_pci_init_one(struct pci_dev *pdev, 4290static int mv_pci_init_one(struct pci_dev *pdev,
4291 const struct pci_device_id *ent); 4291 const struct pci_device_id *ent);
4292#ifdef CONFIG_PM 4292#ifdef CONFIG_PM_SLEEP
4293static int mv_pci_device_resume(struct pci_dev *pdev); 4293static int mv_pci_device_resume(struct pci_dev *pdev);
4294#endif 4294#endif
4295 4295
@@ -4299,7 +4299,7 @@ static struct pci_driver mv_pci_driver = {
4299 .id_table = mv_pci_tbl, 4299 .id_table = mv_pci_tbl,
4300 .probe = mv_pci_init_one, 4300 .probe = mv_pci_init_one,
4301 .remove = ata_pci_remove_one, 4301 .remove = ata_pci_remove_one,
4302#ifdef CONFIG_PM 4302#ifdef CONFIG_PM_SLEEP
4303 .suspend = ata_pci_device_suspend, 4303 .suspend = ata_pci_device_suspend,
4304 .resume = mv_pci_device_resume, 4304 .resume = mv_pci_device_resume,
4305#endif 4305#endif
@@ -4457,7 +4457,7 @@ static int mv_pci_init_one(struct pci_dev *pdev,
4457 IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht); 4457 IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht);
4458} 4458}
4459 4459
4460#ifdef CONFIG_PM 4460#ifdef CONFIG_PM_SLEEP
4461static int mv_pci_device_resume(struct pci_dev *pdev) 4461static int mv_pci_device_resume(struct pci_dev *pdev)
4462{ 4462{
4463 struct ata_host *host = pci_get_drvdata(pdev); 4463 struct ata_host *host = pci_get_drvdata(pdev);
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index ba5f27120332..cdf99fac139a 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -295,7 +295,7 @@ struct nv_swncq_port_priv {
295#define NV_ADMA_CHECK_INTR(GCTL, PORT) ((GCTL) & (1 << (19 + (12 * (PORT))))) 295#define NV_ADMA_CHECK_INTR(GCTL, PORT) ((GCTL) & (1 << (19 + (12 * (PORT)))))
296 296
297static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); 297static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
298#ifdef CONFIG_PM 298#ifdef CONFIG_PM_SLEEP
299static int nv_pci_device_resume(struct pci_dev *pdev); 299static int nv_pci_device_resume(struct pci_dev *pdev);
300#endif 300#endif
301static void nv_ck804_host_stop(struct ata_host *host); 301static void nv_ck804_host_stop(struct ata_host *host);
@@ -379,7 +379,7 @@ static struct pci_driver nv_pci_driver = {
379 .name = DRV_NAME, 379 .name = DRV_NAME,
380 .id_table = nv_pci_tbl, 380 .id_table = nv_pci_tbl,
381 .probe = nv_init_one, 381 .probe = nv_init_one,
382#ifdef CONFIG_PM 382#ifdef CONFIG_PM_SLEEP
383 .suspend = ata_pci_device_suspend, 383 .suspend = ata_pci_device_suspend,
384 .resume = nv_pci_device_resume, 384 .resume = nv_pci_device_resume,
385#endif 385#endif
@@ -2431,7 +2431,7 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
2431 return ata_pci_sff_activate_host(host, ipriv->irq_handler, ipriv->sht); 2431 return ata_pci_sff_activate_host(host, ipriv->irq_handler, ipriv->sht);
2432} 2432}
2433 2433
2434#ifdef CONFIG_PM 2434#ifdef CONFIG_PM_SLEEP
2435static int nv_pci_device_resume(struct pci_dev *pdev) 2435static int nv_pci_device_resume(struct pci_dev *pdev)
2436{ 2436{
2437 struct ata_host *host = pci_get_drvdata(pdev); 2437 struct ata_host *host = pci_get_drvdata(pdev);
diff --git a/drivers/ata/sata_rcar.c b/drivers/ata/sata_rcar.c
index 2b25bd83fc9d..61eb6d77dac7 100644
--- a/drivers/ata/sata_rcar.c
+++ b/drivers/ata/sata_rcar.c
@@ -937,7 +937,7 @@ static int sata_rcar_remove(struct platform_device *pdev)
937 return 0; 937 return 0;
938} 938}
939 939
940#ifdef CONFIG_PM 940#ifdef CONFIG_PM_SLEEP
941static int sata_rcar_suspend(struct device *dev) 941static int sata_rcar_suspend(struct device *dev)
942{ 942{
943 struct ata_host *host = dev_get_drvdata(dev); 943 struct ata_host *host = dev_get_drvdata(dev);
@@ -991,7 +991,7 @@ static struct platform_driver sata_rcar_driver = {
991 .name = DRV_NAME, 991 .name = DRV_NAME,
992 .owner = THIS_MODULE, 992 .owner = THIS_MODULE,
993 .of_match_table = sata_rcar_match, 993 .of_match_table = sata_rcar_match,
994#ifdef CONFIG_PM 994#ifdef CONFIG_PM_SLEEP
995 .pm = &sata_rcar_pm_ops, 995 .pm = &sata_rcar_pm_ops,
996#endif 996#endif
997 }, 997 },
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c
index 3062f8605b29..40b76b2d18c6 100644
--- a/drivers/ata/sata_sil.c
+++ b/drivers/ata/sata_sil.c
@@ -112,7 +112,7 @@ enum {
112}; 112};
113 113
114static int sil_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); 114static int sil_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
115#ifdef CONFIG_PM 115#ifdef CONFIG_PM_SLEEP
116static int sil_pci_device_resume(struct pci_dev *pdev); 116static int sil_pci_device_resume(struct pci_dev *pdev);
117#endif 117#endif
118static void sil_dev_config(struct ata_device *dev); 118static void sil_dev_config(struct ata_device *dev);
@@ -166,7 +166,7 @@ static struct pci_driver sil_pci_driver = {
166 .id_table = sil_pci_tbl, 166 .id_table = sil_pci_tbl,
167 .probe = sil_init_one, 167 .probe = sil_init_one,
168 .remove = ata_pci_remove_one, 168 .remove = ata_pci_remove_one,
169#ifdef CONFIG_PM 169#ifdef CONFIG_PM_SLEEP
170 .suspend = ata_pci_device_suspend, 170 .suspend = ata_pci_device_suspend,
171 .resume = sil_pci_device_resume, 171 .resume = sil_pci_device_resume,
172#endif 172#endif
@@ -802,7 +802,7 @@ static int sil_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
802 &sil_sht); 802 &sil_sht);
803} 803}
804 804
805#ifdef CONFIG_PM 805#ifdef CONFIG_PM_SLEEP
806static int sil_pci_device_resume(struct pci_dev *pdev) 806static int sil_pci_device_resume(struct pci_dev *pdev)
807{ 807{
808 struct ata_host *host = pci_get_drvdata(pdev); 808 struct ata_host *host = pci_get_drvdata(pdev);
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c
index aa1051ba6d13..0534890f118a 100644
--- a/drivers/ata/sata_sil24.c
+++ b/drivers/ata/sata_sil24.c
@@ -353,8 +353,10 @@ static void sil24_error_handler(struct ata_port *ap);
353static void sil24_post_internal_cmd(struct ata_queued_cmd *qc); 353static void sil24_post_internal_cmd(struct ata_queued_cmd *qc);
354static int sil24_port_start(struct ata_port *ap); 354static int sil24_port_start(struct ata_port *ap);
355static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent); 355static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
356#ifdef CONFIG_PM 356#ifdef CONFIG_PM_SLEEP
357static int sil24_pci_device_resume(struct pci_dev *pdev); 357static int sil24_pci_device_resume(struct pci_dev *pdev);
358#endif
359#ifdef CONFIG_PM
358static int sil24_port_resume(struct ata_port *ap); 360static int sil24_port_resume(struct ata_port *ap);
359#endif 361#endif
360 362
@@ -375,7 +377,7 @@ static struct pci_driver sil24_pci_driver = {
375 .id_table = sil24_pci_tbl, 377 .id_table = sil24_pci_tbl,
376 .probe = sil24_init_one, 378 .probe = sil24_init_one,
377 .remove = ata_pci_remove_one, 379 .remove = ata_pci_remove_one,
378#ifdef CONFIG_PM 380#ifdef CONFIG_PM_SLEEP
379 .suspend = ata_pci_device_suspend, 381 .suspend = ata_pci_device_suspend,
380 .resume = sil24_pci_device_resume, 382 .resume = sil24_pci_device_resume,
381#endif 383#endif
@@ -1350,7 +1352,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1350 &sil24_sht); 1352 &sil24_sht);
1351} 1353}
1352 1354
1353#ifdef CONFIG_PM 1355#ifdef CONFIG_PM_SLEEP
1354static int sil24_pci_device_resume(struct pci_dev *pdev) 1356static int sil24_pci_device_resume(struct pci_dev *pdev)
1355{ 1357{
1356 struct ata_host *host = pci_get_drvdata(pdev); 1358 struct ata_host *host = pci_get_drvdata(pdev);
@@ -1370,7 +1372,9 @@ static int sil24_pci_device_resume(struct pci_dev *pdev)
1370 1372
1371 return 0; 1373 return 0;
1372} 1374}
1375#endif
1373 1376
1377#ifdef CONFIG_PM
1374static int sil24_port_resume(struct ata_port *ap) 1378static int sil24_port_resume(struct ata_port *ap)
1375{ 1379{
1376 sil24_config_pmp(ap, ap->nr_pmp_links); 1380 sil24_config_pmp(ap, ap->nr_pmp_links);
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c
index b513428171b3..d1637ac40a73 100644
--- a/drivers/ata/sata_sis.c
+++ b/drivers/ata/sata_sis.c
@@ -82,7 +82,7 @@ static struct pci_driver sis_pci_driver = {
82 .id_table = sis_pci_tbl, 82 .id_table = sis_pci_tbl,
83 .probe = sis_init_one, 83 .probe = sis_init_one,
84 .remove = ata_pci_remove_one, 84 .remove = ata_pci_remove_one,
85#ifdef CONFIG_PM 85#ifdef CONFIG_PM_SLEEP
86 .suspend = ata_pci_device_suspend, 86 .suspend = ata_pci_device_suspend,
87 .resume = ata_pci_device_resume, 87 .resume = ata_pci_device_resume,
88#endif 88#endif
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c
index f72e84228c5c..47bf89464cef 100644
--- a/drivers/ata/sata_via.c
+++ b/drivers/ata/sata_via.c
@@ -103,7 +103,7 @@ static struct pci_driver svia_pci_driver = {
103 .name = DRV_NAME, 103 .name = DRV_NAME,
104 .id_table = svia_pci_tbl, 104 .id_table = svia_pci_tbl,
105 .probe = svia_init_one, 105 .probe = svia_init_one,
106#ifdef CONFIG_PM 106#ifdef CONFIG_PM_SLEEP
107 .suspend = ata_pci_device_suspend, 107 .suspend = ata_pci_device_suspend,
108 .resume = ata_pci_device_resume, 108 .resume = ata_pci_device_resume,
109#endif 109#endif