Revision e7e11d8ba807d451857b5c68abe249c7fc2b980f authored by Alexander Stein on 29 May 2012, 22:07:30 UTC, committed by Linus Torvalds on 29 May 2012, 23:22:32 UTC
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.

[akpm@linux-foundation.org: revert unintentional rename of pca955x_ledsel()]
Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Cc: Bryan Wu <bryan.wu@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 44e1e9f
History
File Mode Size
00-INDEX -rw-r--r-- 708 bytes
LSM.txt -rw-r--r-- 1.7 KB
SELinux.txt -rw-r--r-- 1.0 KB
Smack.txt -rw-r--r-- 27.0 KB
Yama.txt -rw-r--r-- 3.5 KB
apparmor.txt -rw-r--r-- 1.3 KB
credentials.txt -rw-r--r-- 20.4 KB
keys-ecryptfs.txt -rw-r--r-- 3.1 KB
keys-request-key.txt -rw-r--r-- 7.5 KB
keys-trusted-encrypted.txt -rw-r--r-- 7.4 KB
keys.txt -rw-r--r-- 49.7 KB
tomoyo.txt -rw-r--r-- 2.2 KB

back to top