From 22c8753e00ae70a87b56de3f3bcccf45e8346825 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Wed, 7 Oct 2009 00:27:25 +0200 Subject: [PATCH] --- yaml --- r: 167133 b: refs/heads/master c: 7affb32a32eabbbe42d6746923ec1d0bf7327234 h: refs/heads/master i: 167131: 604d3098e689c69fc1a063266c74d939a65199c7 v: v3 --- [refs] | 2 +- trunk/drivers/ata/pata_atp867x.c | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d4bb22579c61..387144cfed60 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c59bcc37cb56e00ae0582339bea948853d600436 +refs/heads/master: 7affb32a32eabbbe42d6746923ec1d0bf7327234 diff --git a/trunk/drivers/ata/pata_atp867x.c b/trunk/drivers/ata/pata_atp867x.c index 4a2cd9a7bad1..6fe7ded40c6a 100644 --- a/trunk/drivers/ata/pata_atp867x.c +++ b/trunk/drivers/ata/pata_atp867x.c @@ -533,6 +533,23 @@ static int atp867x_init_one(struct pci_dev *pdev, 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)