diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-06-27 17:19:35 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-01 07:31:14 -0400 |
commit | 3c33be0b0dae390557f41a604ac621d0f3eabf9b (patch) | |
tree | 1b360a6d41d109e24853cc9d1411aa378dde19ba /drivers/platform | |
parent | 818e14860615634646e1fe176d49e4357a4e1534 (diff) |
acer-wmi: Use struct dev_pm_ops for power management
Make the acer-wmi driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct platform_driver.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Tested-by: Lee, Chun-Yi <jlee@suse.com>
Acked-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r-- | drivers/platform/x86/acer-wmi.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index ce875dc365e5..c8f40c9c0428 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c | |||
@@ -1877,8 +1877,7 @@ static int acer_platform_remove(struct platform_device *device) | |||
1877 | return 0; | 1877 | return 0; |
1878 | } | 1878 | } |
1879 | 1879 | ||
1880 | static int acer_platform_suspend(struct platform_device *dev, | 1880 | static int acer_suspend(struct device *dev) |
1881 | pm_message_t state) | ||
1882 | { | 1881 | { |
1883 | u32 value; | 1882 | u32 value; |
1884 | struct acer_data *data = &interface->data; | 1883 | struct acer_data *data = &interface->data; |
@@ -1900,7 +1899,7 @@ pm_message_t state) | |||
1900 | return 0; | 1899 | return 0; |
1901 | } | 1900 | } |
1902 | 1901 | ||
1903 | static int acer_platform_resume(struct platform_device *device) | 1902 | static int acer_resume(struct device *dev) |
1904 | { | 1903 | { |
1905 | struct acer_data *data = &interface->data; | 1904 | struct acer_data *data = &interface->data; |
1906 | 1905 | ||
@@ -1916,6 +1915,8 @@ static int acer_platform_resume(struct platform_device *device) | |||
1916 | return 0; | 1915 | return 0; |
1917 | } | 1916 | } |
1918 | 1917 | ||
1918 | static SIMPLE_DEV_PM_OPS(acer_pm, acer_suspend, acer_resume); | ||
1919 | |||
1919 | static void acer_platform_shutdown(struct platform_device *device) | 1920 | static void acer_platform_shutdown(struct platform_device *device) |
1920 | { | 1921 | { |
1921 | struct acer_data *data = &interface->data; | 1922 | struct acer_data *data = &interface->data; |
@@ -1931,11 +1932,10 @@ static struct platform_driver acer_platform_driver = { | |||
1931 | .driver = { | 1932 | .driver = { |
1932 | .name = "acer-wmi", | 1933 | .name = "acer-wmi", |
1933 | .owner = THIS_MODULE, | 1934 | .owner = THIS_MODULE, |
1935 | .pm = &acer_pm, | ||
1934 | }, | 1936 | }, |
1935 | .probe = acer_platform_probe, | 1937 | .probe = acer_platform_probe, |
1936 | .remove = acer_platform_remove, | 1938 | .remove = acer_platform_remove, |
1937 | .suspend = acer_platform_suspend, | ||
1938 | .resume = acer_platform_resume, | ||
1939 | .shutdown = acer_platform_shutdown, | 1939 | .shutdown = acer_platform_shutdown, |
1940 | }; | 1940 | }; |
1941 | 1941 | ||