summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorFrans Pop <elendil@planet.nl>2009-07-22 19:57:05 +0200
committerRafael J. Wysocki <rjw@sisk.pl>2009-07-22 19:57:05 +0200
commit99efe852e83b9e4d4b746e1a1001a6c56ad6f780 (patch)
treed77c580763e7c198b584e8fef838525a1a9a9f8e /drivers
parenta3340e5cebf07ab7b05c8265653df01897265dcb (diff)
hp-wmi: switch driver to dev_pm_ops
Gets rid of the following warning: Platform driver 'hp-wmi' needs updating - please use dev_pm_ops I tested that the resume handler still works on my HP 2510p notebook. Signed-off-by: Frans Pop <elendil@planet.nl> Cc: John W. Linville <linville@tuxdriver.com> Cc: Matthew Garrett <mjg@redhat.com> Cc: Len Brown <len.brown@intel.com> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/hp-wmi.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index ca508564a181..7c4a22bdc49d 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -53,7 +53,7 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4");
static int __init hp_wmi_bios_setup(struct platform_device *device);
static int __exit hp_wmi_bios_remove(struct platform_device *device);
-static int hp_wmi_resume_handler(struct platform_device *device);
+static int hp_wmi_resume_handler(struct device *device);
struct bios_args {
u32 signature;
@@ -94,14 +94,18 @@ static struct rfkill *wifi_rfkill;
static struct rfkill *bluetooth_rfkill;
static struct rfkill *wwan_rfkill;
+static struct dev_pm_ops hp_wmi_pm_ops = {
+ .resume = hp_wmi_resume_handler,
+};
+
static struct platform_driver hp_wmi_driver = {
.driver = {
- .name = "hp-wmi",
- .owner = THIS_MODULE,
+ .name = "hp-wmi",
+ .owner = THIS_MODULE,
+ .pm = &hp_wmi_pm_ops,
},
.probe = hp_wmi_bios_setup,
.remove = hp_wmi_bios_remove,
- .resume = hp_wmi_resume_handler,
};
static int hp_wmi_perform_query(int query, int write, int value)
@@ -512,7 +516,7 @@ static int __exit hp_wmi_bios_remove(struct platform_device *device)
return 0;
}
-static int hp_wmi_resume_handler(struct platform_device *device)
+static int hp_wmi_resume_handler(struct device *device)
{
/*
* Hardware state may have changed while suspended, so trigger