[PATCH] Switch leds from mutex to spinlock to work in atomic contexts
Holger Freyther
zecke at openmoko.org
Mon Jul 7 11:04:22 CEST 2008
Hey,
cat /sys/class/leds/some-led/trigger will show you which triggers are
available. echo "bat-charging" > trigger will enable the trigger for this
led. Now doing this lead to a BUG call as mutex_lock will use might_sleep
which is forbidden in atomic contexts. Switch from using a mutex to spinlock
to control the brightnes of the leds...
this patch seems to work, mutex_destroy was replaced with nothing but that
looks correct too.
z.
PS: The LED trigger for charging works but with a bigger delay... we might
want to schedule something when usb was plugged as we know we are going to
charge soon?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-neo1973-leds-Move-from-mutex-to-spinlock-because-w.patch
Type: text/x-diff
Size: 2206 bytes
Desc: not available
Url : http://lists.openmoko.org/pipermail/openmoko-kernel/attachments/20080707/be42bfd6/attachment.patch
More information about the openmoko-kernel
mailing list