+ backlight-convert-from-legacy-pm-ops-to-dev_pm_ops.patch added to -mm tree
Subsystems (2)
Subject: + backlight-convert-from-legacy-pm-ops-to-dev_pm_ops.patch added to -mm tree
To: [email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 04 Jun 2013 13:17:45 -0700
The patch titled
Subject: backlight: convert from legacy pm ops to dev_pm_ops
has been added to the -mm tree. Its filename is
backlight-convert-from-legacy-pm-ops-to-dev_pm_ops.patch
Before you just go and hit "reply", please:
a) Consider who else should be cc'ed
b) Prefer to cc a suitable mailing list as well
c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's
*** Remember to use Documentation/SubmitChecklist when testing your code ***
The -mm tree is included into linux-next and is updated there every 3-4 working days
------------------------------------------------------
From: Shuah Khan <[email protected]>
Subject: backlight: convert from legacy pm ops to dev_pm_ops
Convert drivers/video/backlight/class to use dev_pm_ops for power management and remove Legacy PM ops hooks. With this change, backlight class registers suspend/resume callbacks via class->pm (dev_pm_ops) instead of Legacy class->suspend/resume. When __device_suspend() runs call-backs, it will find class->pm ops for the backlight class.
---
drivers/video/backlight/backlight.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/video/backlight/backlight.c renamed from drivers/video/backlight/backlight.c~backlight-convert-from-legacy-pm-ops-to-dev_pm_ops +5 -3
@@ -208,7 +208,7 @@ static ssize_t backlight_show_actual_bristatic struct class *backlight_class; -static int backlight_suspend (struct device *dev,pm_message_t state) +static int backlight_suspend (struct device *dev) {struct backlight_device *bd =to_backlight_device (dev);
@@ -236,6 +236,9 @@ static int backlight_resume(struct devicreturn 0 ; } +static SIMPLE_DEV_PM_OPS(backlight_class_dev_pm_ops, backlight_suspend, + backlight_resume); +static void bl_device_release (struct device *dev) {struct backlight_device *bd =to_backlight_device (dev);
@@ -489,8 +492,7 @@ static int __init backlight_class_init(v } backlight_class->dev_attrs = bl_device_attributes; - backlight_class->suspend = backlight_suspend; - backlight_class->resume = backlight_resume; + backlight_class->pm = &backlight_class_dev_pm_ops;return 0 ; }
_
Patches currently in -mm which might be from [email protected] are
linux-next.patch backlight-convert-from-legacy-pm-ops-to-dev_pm_ops.patch drivers-rtc-class-convert-from-legacy-pm-ops-to-dev_pm_ops.patch