diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-10-07 00:27:25 +0200 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-10-06 20:58:23 -0400 |
commit | 7affb32a32eabbbe42d6746923ec1d0bf7327234 (patch) | |
tree | 618dcb41a771622370f1fbaeca3fe88ff222a83f /drivers/ata | |
parent | c59bcc37cb56e00ae0582339bea948853d600436 (diff) | |
download | linux-3.10-7affb32a32eabbbe42d6746923ec1d0bf7327234.tar.gz linux-3.10-7affb32a32eabbbe42d6746923ec1d0bf7327234.tar.bz2 linux-3.10-7affb32a32eabbbe42d6746923ec1d0bf7327234.zip |
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.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/ata/pata_atp867x.c b/drivers/ata/pata_atp867x.c index 4a2cd9a7bad..6fe7ded40c6 100644 --- a/drivers/ata/pata_atp867x.c +++ b/drivers/ata/pata_atp867x.c @@ -533,6 +533,23 @@ err_out: return rc; } +#ifdef CONFIG_PM +static int atp867x_reinit_one(struct pci_dev *pdev) +{ + struct ata_host *host = dev_get_drvdata(&pdev->dev); + int rc; + + rc = ata_pci_device_do_resume(pdev); + if (rc) + return rc; + + atp867x_fixup(host); + + ata_host_resume(host); + return 0; +} +#endif + static struct pci_device_id atp867x_pci_tbl[] = { { PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP867A), 0 }, { PCI_VDEVICE(ARTOP, PCI_DEVICE_ID_ARTOP_ATP867B), 0 }, @@ -544,6 +561,10 @@ static struct pci_driver atp867x_driver = { .id_table = atp867x_pci_tbl, .probe = atp867x_init_one, .remove = ata_pci_remove_one, +#ifdef CONFIG_PM + .suspend = ata_pci_device_suspend, + .resume = atp867x_reinit_one, +#endif }; static int __init atp867x_init(void) |