lkml.org 
[lkml]   [2012]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH missing 2/21] fujitsu-tablet: Use struct dev_pm_ops for power management
Date
From: Rafael J. Wysocki <rjw@sisk.pl>

Make the fujitsu-tablet driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct acpi_device_ops.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---

Hi all,

Another driver overlooked during the ACPI conversion to PM handling based on
struct dev_pm_ops, sorry about that.

This one should go after the classmate-laptop patch I've just posted.

Thanks,
Rafael

---
drivers/platform/x86/fujitsu-tablet.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

Index: linux/drivers/platform/x86/fujitsu-tablet.c
===================================================================
--- linux.orig/drivers/platform/x86/fujitsu-tablet.c
+++ linux/drivers/platform/x86/fujitsu-tablet.c
@@ -440,12 +440,14 @@ static int __devexit acpi_fujitsu_remove
return 0;
}

-static int acpi_fujitsu_resume(struct acpi_device *adev)
+static int acpi_fujitsu_resume(struct device *dev)
{
fujitsu_reset();
return 0;
}

+static SIMPLE_DEV_PM_OPS(acpi_fujitsu_pm, NULL, acpi_fujitsu_resume);
+
static struct acpi_driver acpi_fujitsu_driver = {
.name = MODULENAME,
.class = "hotkey",
@@ -453,8 +455,8 @@ static struct acpi_driver acpi_fujitsu_d
.ops = {
.add = acpi_fujitsu_add,
.remove = acpi_fujitsu_remove,
- .resume = acpi_fujitsu_resume,
- }
+ },
+ .drv.pm = &acpi_fujitsu_pm,
};

static int __init fujitsu_module_init(void)


\
 
 \ /
  Last update: 2012-06-29 01:01    [W:0.079 / U:5.132 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site