diff options
| author | Alexander Stein <[email protected]> | 2012-05-29 15:07:30 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2012-05-29 16:22:32 -0700 |
| commit | e7e11d8ba807d451857b5c68abe249c7fc2b980f (patch) | |
| tree | d93a84ccd11589da51e93b76924d30d2f8eec626 /lib/mpi/mpi-internal.h | |
| parent | 44e1e9f8e70506728b02a18e6d03599a6485d67f (diff) | |
drivers/leds/leds-pca955x.c: fix race condition while setting brightness on several LEDs
When issuing the following command:
for I in 0 1 2 3 4 5 6 7; do
echo 0 > /sys/class/leds/pca955x\:${I}/brightness;
done
It is possible that all the pca955x_read_ls calls are done sequentially
before any pca955x_write_ls call is done. This updates the LS only to
the last LED update in its set.
Fix this by using a global lock for the pca995x device during
pca955x_led_work. Also used a struct for shared data betreen all LEDs.
[[email protected]: revert unintentional rename of pca955x_ledsel()]
Signed-off-by: Alexander Stein <[email protected]>
Cc: Richard Purdie <[email protected]>
Cc: Bryan Wu <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-internal.h')
0 files changed, 0 insertions, 0 deletions