vib-trashes-resume-fix.patch

From: warmcat <[EMAIL PROTECTED]>

The resume stuff for vibrator was broken --> OOPS... I guess it was never
tested on GTA02 yet considering it did not have an active device associated
with the driver until today.  Fixed.

Signed-off-by: Andy Green <[EMAIL PROTECTED]>
---

 drivers/leds/leds-neo1973-vibrator.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


diff --git a/drivers/leds/leds-neo1973-vibrator.c b/drivers/leds/leds-neo1973-vibrator.c
index 315fa81..c943a6a 100644
--- a/drivers/leds/leds-neo1973-vibrator.c
+++ b/drivers/leds/leds-neo1973-vibrator.c
@@ -99,11 +99,11 @@ static int neo1973_vib_resume(struct platform_device *dev)
 {
 	struct neo1973_vib_priv *vp = platform_get_drvdata(dev);
 
-	led_classdev_resume(&neo1973_vib_led.cdev);
-
 	if (vp->has_pwm)
 		neo1973_vib_init_hw(vp);
 
+	led_classdev_resume(&neo1973_vib_led.cdev);
+
 	return 0;
 }
 #endif /* CONFIG_PM */
@@ -121,6 +121,7 @@ static int __init neo1973_vib_probe(struct platform_device *pdev)
 		return -EIO;
 
 	neo1973_vib_led.gpio = r->start;
+	platform_set_drvdata(pdev, &neo1973_vib_led);
 
 	/* TOUT3 */
 	if (neo1973_vib_led.gpio == S3C2410_GPB3) {

Reply via email to