aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx/patches-2.6.24/1128--led-Misc-fixes-in-the-driver-code.patch
diff options
context:
space:
mode:
authorMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
committerMirko Vogt <mirko@openwrt.org>2008-12-12 11:58:53 +0000
commit614683faf8029100802db06a825648d0b6490285 (patch)
tree7401b135dc7ce24ff0175e67e0f2ce7f96296ff0 /target/linux/s3c24xx/patches-2.6.24/1128--led-Misc-fixes-in-the-driver-code.patch
parent4a018d2445c5f249179ff82c8fffb0e3b717f738 (diff)
downloadupstream-614683faf8029100802db06a825648d0b6490285.tar.gz
upstream-614683faf8029100802db06a825648d0b6490285.tar.bz2
upstream-614683faf8029100802db06a825648d0b6490285.zip
changed Makefile and profiles, added patches for kernel 2.6.24 (stable-branch of Openmoko)
SVN-Revision: 13613
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.24/1128--led-Misc-fixes-in-the-driver-code.patch')
-rw-r--r--target/linux/s3c24xx/patches-2.6.24/1128--led-Misc-fixes-in-the-driver-code.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.24/1128--led-Misc-fixes-in-the-driver-code.patch b/target/linux/s3c24xx/patches-2.6.24/1128--led-Misc-fixes-in-the-driver-code.patch
new file mode 100644
index 0000000000..2031019f7e
--- /dev/null
+++ b/target/linux/s3c24xx/patches-2.6.24/1128--led-Misc-fixes-in-the-driver-code.patch
@@ -0,0 +1,53 @@
+From 218ecc6801019388f1856547875635bfbb671342 Mon Sep 17 00:00:00 2001
+From: Holger Freyther <zecke@openmoko.org>
+Date: Sun, 13 Apr 2008 07:25:58 +0100
+Subject: [PATCH] [led] Misc fixes in the driver code
+ to_bundle returned the wrong data. The platform_device is the
+ parent of the class_device used by the LED device class. Return
+ the correct class.
+
+ num_leds was not set to the correct number of registered LEDs. All
+ loops using num_leds (e.g. module unloading) were not executed at
+ all.
+
+ On removal of the module disable all LEDs.
+
+Signed-Off-By: Holger Freyther <zecke@openmoko.org>
+---
+ drivers/leds/leds-neo1973-gta02.c | 6 +++++-
+ 1 files changed, 5 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/leds/leds-neo1973-gta02.c b/drivers/leds/leds-neo1973-gta02.c
+index fbb62c4..343550a 100644
+--- a/drivers/leds/leds-neo1973-gta02.c
++++ b/drivers/leds/leds-neo1973-gta02.c
+@@ -46,7 +46,7 @@ static inline struct gta02_led_priv *to_priv(struct led_classdev *led_cdev)
+
+ static inline struct gta02_led_bundle *to_bundle(struct led_classdev *led_cdev)
+ {
+- return dev_get_drvdata(led_cdev->dev);
++ return dev_get_drvdata(led_cdev->dev->parent);
+ }
+
+ static void gta02led_set(struct led_classdev *led_cdev,
+@@ -174,6 +174,8 @@ static int __init gta02led_probe(struct platform_device *pdev)
+ rc = led_classdev_register(&pdev->dev, &lp->cdev);
+ }
+
++ bundle->num_leds = i;
++
+ return 0;
+ }
+
+@@ -186,6 +188,8 @@ static int gta02led_remove(struct platform_device *pdev)
+ struct gta02_led_priv *lp = &bundle->led[i];
+ if (lp->has_pwm)
+ s3c2410_pwm_disable(&lp->pwm);
++ else
++ gta02led_set(&lp->cdev, 0);
+
+ led_classdev_unregister(&lp->cdev);
+ mutex_destroy(&lp->mutex);
+--
+1.5.6.5
+