aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorShiraz Hashim <shiraz.hashim@st.com>2012-03-16 06:19:55 -0400
committerJeff Garzik <jgarzik@redhat.com>2012-07-25 15:31:08 -0400
commit18c25ff457d1f035361cfea2cd8c7d1d477d2221 (patch)
tree01275a9627b7b44bf33fcd462a26e37948caabc2 /drivers/ata
parent604284071ab09df80fc9872c84c3b4b914ce0f95 (diff)
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')
-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 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/gfp.h> 16#include <linux/gfp.h>
17#include <linux/module.h> 17#include <linux/module.h>
18#include <linux/pm.h>
18#include <linux/init.h> 19#include <linux/init.h>
19#include <linux/interrupt.h> 20#include <linux/interrupt.h>
20#include <linux/device.h> 21#include <linux/device.h>
@@ -271,13 +272,10 @@ static int ahci_resume(struct device *dev)
271 272
272 return 0; 273 return 0;
273} 274}
274
275static struct dev_pm_ops ahci_pm_ops = {
276 .suspend = &ahci_suspend,
277 .resume = &ahci_resume,
278};
279#endif 275#endif
280 276
277SIMPLE_DEV_PM_OPS(ahci_pm_ops, ahci_suspend, ahci_resume);
278
281static const struct of_device_id ahci_of_match[] = { 279static const struct of_device_id ahci_of_match[] = {
282 { .compatible = "calxeda,hb-ahci", }, 280 { .compatible = "calxeda,hb-ahci", },
283 { .compatible = "snps,spear-ahci", }, 281 { .compatible = "snps,spear-ahci", },
@@ -291,9 +289,7 @@ static struct platform_driver ahci_driver = {
291 .name = "ahci", 289 .name = "ahci",
292 .owner = THIS_MODULE, 290 .owner = THIS_MODULE,
293 .of_match_table = ahci_of_match, 291 .of_match_table = ahci_of_match,
294#ifdef CONFIG_PM
295 .pm = &ahci_pm_ops, 292 .pm = &ahci_pm_ops,
296#endif
297 }, 293 },
298 .id_table = ahci_devtype, 294 .id_table = ahci_devtype,
299}; 295};