Commit 8dd2b426 authored by Frans Pop's avatar Frans Pop Committed by Rafael J. Wysocki

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.

[rjw: Fixed up the definition of hp_wmi_pm_ops.]
Signed-off-by: default avatarFrans Pop <elendil@planet.nl>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
parent c90cd332
...@@ -53,7 +53,7 @@ MODULE_ALIAS("wmi:5FB7F034-2C63-45e9-BE91-3D44E2C707E4"); ...@@ -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 __init hp_wmi_bios_setup(struct platform_device *device);
static int __exit hp_wmi_bios_remove(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 { struct bios_args {
u32 signature; u32 signature;
...@@ -94,14 +94,19 @@ static struct rfkill *wifi_rfkill; ...@@ -94,14 +94,19 @@ static struct rfkill *wifi_rfkill;
static struct rfkill *bluetooth_rfkill; static struct rfkill *bluetooth_rfkill;
static struct rfkill *wwan_rfkill; static struct rfkill *wwan_rfkill;
static struct dev_pm_ops hp_wmi_pm_ops = {
.resume = hp_wmi_resume_handler,
.restore = hp_wmi_resume_handler,
};
static struct platform_driver hp_wmi_driver = { static struct platform_driver hp_wmi_driver = {
.driver = { .driver = {
.name = "hp-wmi", .name = "hp-wmi",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.pm = &hp_wmi_pm_ops,
}, },
.probe = hp_wmi_bios_setup, .probe = hp_wmi_bios_setup,
.remove = hp_wmi_bios_remove, .remove = hp_wmi_bios_remove,
.resume = hp_wmi_resume_handler,
}; };
static int hp_wmi_perform_query(int query, int write, int value) static int hp_wmi_perform_query(int query, int write, int value)
...@@ -512,7 +517,7 @@ static int __exit hp_wmi_bios_remove(struct platform_device *device) ...@@ -512,7 +517,7 @@ static int __exit hp_wmi_bios_remove(struct platform_device *device)
return 0; 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 * Hardware state may have changed while suspended, so trigger
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment