summaryrefslogtreecommitdiffstats
path: root/drivers/ata/ahci_platform.c
diff options
context:
space:
mode:
authorShiraz Hashim <shiraz.hashim@st.com>2012-03-16 11:19:55 +0100
committerJeff Garzik <jgarzik@redhat.com>2012-07-25 21:31:08 +0200
commit18c25ff457d1f035361cfea2cd8c7d1d477d2221 (patch)
tree01275a9627b7b44bf33fcd462a26e37948caabc2 /drivers/ata/ahci_platform.c
parentlibata-eh.c: local functions should not be exposed globally (diff)
downloadlinux-18c25ff457d1f035361cfea2cd8c7d1d477d2221.tar.xz
linux-18c25ff457d1f035361cfea2cd8c7d1d477d2221.zip
ahci_platform: add hibernation callbacks
Use existing suspend, resume implementation for hibernation callbacks. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/ahci_platform.c')
-rw-r--r--drivers/ata/ahci_platform.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/ata/ahci_platform.c b/drivers/ata/ahci_platform.c
index 9e419e1c2006..09728e09cb31 100644
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -15,6 +15,7 @@
#include <linux/kernel.h>
#include <linux/gfp.h>
#include <linux/module.h>
+#include <linux/pm.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/device.h>
@@ -271,13 +272,10 @@ static int ahci_resume(struct device *dev)
return 0;
}
-
-static struct dev_pm_ops ahci_pm_ops = {
- .suspend = &ahci_suspend,
- .resume = &ahci_resume,
-};
#endif
+SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_suspend, ahci_resume);
+
static const struct of_device_id ahci_of_match[] = {
{ .compatible = "calxeda,hb-ahci", },
{ .compatible = "snps,spear-ahci", },
@@ -291,9 +289,7 @@ static struct platform_driver ahci_driver = {
.name = "ahci",
.owner = THIS_MODULE,
.of_match_table = ahci_of_match,
-#ifdef CONFIG_PM
.pm = &ahci_pm_ops,
-#endif
},
.id_table = ahci_devtype,
};