aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-10-06 18:27:25 -0400
committerJeff Garzik <jgarzik@redhat.com>2009-10-06 20:58:23 -0400
commit7affb32a32eabbbe42d6746923ec1d0bf7327234 (patch)
tree618dcb41a771622370f1fbaeca3fe88ff222a83f /drivers/ata
parentc59bcc37cb56e00ae0582339bea948853d600436 (diff)
pata_atp867x: add Power Management support
Cc: Jung-Ik (John) Lee <jilee@google.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_atp867x.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/ata/pata_atp867x.c b/drivers/ata/pata_atp867x.c
index 4a2cd9a7bad1..6fe7ded40c6a 100644
--- a/drivers/ata/pata_atp867x.c
+++ b/drivers/ata/pata_atp867x.c
@@ -533,6 +533,23 @@ err_out:
533 return rc; 533 return rc;
534} 534}
535 535
536#ifdef CONFIG_PM
537static int atp867x_reinit_one(struct pci_dev *pdev)
538{
539 struct ata_host *host = dev_get_drvdata(&pdev->dev);
540 int rc;
541
542 rc = ata_pci_device_do_resume(pdev);
543 if (rc)
544 return rc;
545
546 atp867x_fixup(host);
547
548 ata_host_resume(host);
549 return 0;
550}
551#endif
552
536static struct pci_device_id atp867x_pci_tbl[] = { 553static struct pci_device_id atp867x_pci_tbl[] = {
537 { PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP867A), 0 }, 554 { PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP867A), 0 },
538 { PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP867B), 0 }, 555 { PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP867B), 0 },
@@ -544,6 +561,10 @@ static struct pci_driver atp867x_driver = {
544 .id_table = atp867x_pci_tbl, 561 .id_table = atp867x_pci_tbl,
545 .probe = atp867x_init_one, 562 .probe = atp867x_init_one,
546 .remove = ata_pci_remove_one, 563 .remove = ata_pci_remove_one,
564#ifdef CONFIG_PM
565 .suspend = ata_pci_device_suspend,
566 .resume = atp867x_reinit_one,
567#endif
547}; 568};
548 569
549static int __init atp867x_init(void) 570static int __init atp867x_init(void)