aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/s3c24xx/patches-2.6.24/1226-From-3a32be40f78404d5f1185f0b3d6b5632381cb33f-Mon-Se.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
commitfac7f7f84f3771c5247c7fdee825c092077984f5 (patch)
tree54644c1229434d7ee13c5872bda4129e34337fc0 /target/linux/s3c24xx/patches-2.6.24/1226-From-3a32be40f78404d5f1185f0b3d6b5632381cb33f-Mon-Se.patch
parenta34279723a9cf0796f9261f2fb90bea18cd95711 (diff)
downloadupstream-fac7f7f84f3771c5247c7fdee825c092077984f5.tar.gz
upstream-fac7f7f84f3771c5247c7fdee825c092077984f5.tar.bz2
upstream-fac7f7f84f3771c5247c7fdee825c092077984f5.zip
changed Makefile and profiles, added patches for kernel 2.6.24
(stable-branch of Openmoko) git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13613 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.24/1226-From-3a32be40f78404d5f1185f0b3d6b5632381cb33f-Mon-Se.patch')
-rw-r--r--target/linux/s3c24xx/patches-2.6.24/1226-From-3a32be40f78404d5f1185f0b3d6b5632381cb33f-Mon-Se.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.24/1226-From-3a32be40f78404d5f1185f0b3d6b5632381cb33f-Mon-Se.patch b/target/linux/s3c24xx/patches-2.6.24/1226-From-3a32be40f78404d5f1185f0b3d6b5632381cb33f-Mon-Se.patch
new file mode 100644
index 0000000000..6bca9e3349
--- /dev/null
+++ b/target/linux/s3c24xx/patches-2.6.24/1226-From-3a32be40f78404d5f1185f0b3d6b5632381cb33f-Mon-Se.patch
@@ -0,0 +1,73 @@
+From 9c058ff0d2641df3c36fc3300acb72078d2c41d4 Mon Sep 17 00:00:00 2001
+From: Holger Freyther <zecke@openmoko.org>
+Date: Tue, 8 Jul 2008 18:38:19 +0100
+Subject: [PATCH] From 3a32be40f78404d5f1185f0b3d6b5632381cb33f Mon Sep 17 00:00:00 2001
+ Subject: [PATCH] [neo1973 leds] Move from mutex to spinlock because we may not use mutexes
+ The led triggers may call set_brightness from atomic contexts. As
+ mutex_lock calls might_sleep and sleeping is not allowed in atomic contexts
+ we have to switch to spinlocks here.
+
+Signed-Off-By: Holger Freyther <zecke@openmoko.org>
+---
+ drivers/leds/leds-neo1973-gta02.c | 10 +++++-----
+ 1 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/leds/leds-neo1973-gta02.c b/drivers/leds/leds-neo1973-gta02.c
+index 952ad69..8fe817b 100644
+--- a/drivers/leds/leds-neo1973-gta02.c
++++ b/drivers/leds/leds-neo1973-gta02.c
+@@ -27,7 +27,7 @@
+
+ struct gta02_led_priv
+ {
+- struct mutex mutex;
++ spinlock_t lock;
+ struct led_classdev cdev;
+ struct s3c2410_pwm pwm;
+ unsigned int gpio;
+@@ -53,6 +53,7 @@ static inline struct gta02_led_bundle *to_bundle(struct led_classdev *led_cdev)
+ static void gta02led_set(struct led_classdev *led_cdev,
+ enum led_brightness value)
+ {
++ unsigned long flags;
+ struct gta02_led_priv *lp = to_priv(led_cdev);
+
+ /*
+@@ -60,7 +61,7 @@ static void gta02led_set(struct led_classdev *led_cdev,
+ * value == 128 -> 50% duty cycle (medium power)
+ * value == 0 -> 0% duty cycle (zero power)
+ */
+- mutex_lock(&lp->mutex);
++ spin_lock_irqsave(&lp->lock, flags);
+
+ if (lp->has_pwm) {
+ s3c2410_pwm_duty_cycle(value, &lp->pwm);
+@@ -68,7 +69,7 @@ static void gta02led_set(struct led_classdev *led_cdev,
+ neo1973_gpb_setpin(lp->gpio, value ? 1 : 0);
+ }
+
+- mutex_unlock(&lp->mutex);
++ spin_unlock_irqrestore(&lp->lock, flags);
+ }
+
+ #ifdef CONFIG_PM
+@@ -170,7 +171,7 @@ static int __init gta02led_probe(struct platform_device *pdev)
+ break;
+ }
+
+- mutex_init(&lp->mutex);
++ spin_lock_init(&lp->lock);
+ rc = led_classdev_register(&pdev->dev, &lp->cdev);
+ }
+
+@@ -192,7 +193,6 @@ static int gta02led_remove(struct platform_device *pdev)
+ gta02led_set(&lp->cdev, 0);
+
+ led_classdev_unregister(&lp->cdev);
+- mutex_destroy(&lp->mutex);
+ }
+
+ platform_set_drvdata(pdev, NULL);
+--
+1.5.6.5
+