diff options
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rwxr-xr-x | drivers/ata/sata_mv.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index 53a1d97cd9a6..73768195ccc2 100755 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
@@ -4161,6 +4161,9 @@ static struct platform_driver mv_platform_driver = { | |||
4161 | #ifdef CONFIG_PCI | 4161 | #ifdef CONFIG_PCI |
4162 | static int mv_pci_init_one(struct pci_dev *pdev, | 4162 | static int mv_pci_init_one(struct pci_dev *pdev, |
4163 | const struct pci_device_id *ent); | 4163 | const struct pci_device_id *ent); |
4164 | #ifdef CONFIG_PM | ||
4165 | static int mv_pci_device_resume(struct pci_dev *pdev); | ||
4166 | #endif | ||
4164 | 4167 | ||
4165 | 4168 | ||
4166 | static struct pci_driver mv_pci_driver = { | 4169 | static struct pci_driver mv_pci_driver = { |
@@ -4168,6 +4171,11 @@ static struct pci_driver mv_pci_driver = { | |||
4168 | .id_table = mv_pci_tbl, | 4171 | .id_table = mv_pci_tbl, |
4169 | .probe = mv_pci_init_one, | 4172 | .probe = mv_pci_init_one, |
4170 | .remove = ata_pci_remove_one, | 4173 | .remove = ata_pci_remove_one, |
4174 | #ifdef CONFIG_PM | ||
4175 | .suspend = ata_pci_device_suspend, | ||
4176 | .resume = mv_pci_device_resume, | ||
4177 | #endif | ||
4178 | |||
4171 | }; | 4179 | }; |
4172 | 4180 | ||
4173 | /* move to PCI layer or libata core? */ | 4181 | /* move to PCI layer or libata core? */ |
@@ -4324,6 +4332,27 @@ static int mv_pci_init_one(struct pci_dev *pdev, | |||
4324 | return ata_host_activate(host, pdev->irq, mv_interrupt, IRQF_SHARED, | 4332 | return ata_host_activate(host, pdev->irq, mv_interrupt, IRQF_SHARED, |
4325 | IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht); | 4333 | IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht); |
4326 | } | 4334 | } |
4335 | |||
4336 | #ifdef CONFIG_PM | ||
4337 | static int mv_pci_device_resume(struct pci_dev *pdev) | ||
4338 | { | ||
4339 | struct ata_host *host = dev_get_drvdata(&pdev->dev); | ||
4340 | int rc; | ||
4341 | |||
4342 | rc = ata_pci_device_do_resume(pdev); | ||
4343 | if (rc) | ||
4344 | return rc; | ||
4345 | |||
4346 | /* initialize adapter */ | ||
4347 | rc = mv_init_host(host); | ||
4348 | if (rc) | ||
4349 | return rc; | ||
4350 | |||
4351 | ata_host_resume(host); | ||
4352 | |||
4353 | return 0; | ||
4354 | } | ||
4355 | #endif | ||
4327 | #endif | 4356 | #endif |
4328 | 4357 | ||
4329 | static int mv_platform_probe(struct platform_device *pdev); | 4358 | static int mv_platform_probe(struct platform_device *pdev); |