[PATCH] leds-mc13892: fix suspend/resume

Bryan Wu bryan.wu at canonical.com
Thu Mar 18 03:38:15 UTC 2010


From: Jeremy Kerr <jeremy.kerr at canonical.com>

BugLink: http://bugs.launchpad.net/bugs/537083

The workqueue update for the leds-mc13892 driver introduced a regression
where machine would no longer suspend and resume, as the wrong type was
being retrieved from the platform drvdata.

This change updates the suspend and resume functions to use the struct
mc13892_led type.

Signed-off-by: Jeremy Kerr <jeremy.kerr at canonical.com>
Signed-off-by: Bryan Wu <bryan.wu at canonical.com>
---
 drivers/leds/leds-mc13892.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/leds/leds-mc13892.c b/drivers/leds/leds-mc13892.c
index 464bec9..02e7c9d 100644
--- a/drivers/leds/leds-mc13892.c
+++ b/drivers/leds/leds-mc13892.c
@@ -121,17 +121,17 @@ err_free:
 #ifdef CONFIG_PM
 static int mc13892_led_suspend(struct platform_device *dev, pm_message_t state)
 {
-	struct led_classdev *led_cdev = platform_get_drvdata(dev);
+	struct mc13892_led *led = platform_get_drvdata(dev);
 
-	led_classdev_suspend(led_cdev);
+	led_classdev_suspend(&led->cdev);
 	return 0;
 }
 
 static int mc13892_led_resume(struct platform_device *dev)
 {
-	struct led_classdev *led_cdev = platform_get_drvdata(dev);
+	struct mc13892_led *led = platform_get_drvdata(dev);
 
-	led_classdev_resume(led_cdev);
+	led_classdev_resume(&led->cdev);
 	return 0;
 }
 #else
-- 
1.7.0





More information about the kernel-team mailing list