Skip to content

Commit

Permalink
ahci_platform: add hibernation callbacks
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shiraz Hashim authored and Jeff Garzik committed Jul 25, 2012
1 parent 6042840 commit 18c25ff
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/ata/ahci_platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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", },
Expand All @@ -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,
};
Expand Down

0 comments on commit 18c25ff

Please sign in to comment.