]> git.baikalelectronics.ru Git - kernel.git/commit
leds: pca9532: correct shift computation in pca9532_getled
authorMarkus Moll <moll.markus@arcor.de>
Tue, 22 Sep 2020 19:28:35 +0000 (21:28 +0200)
committerPavel Machek <pavel@ucw.cz>
Wed, 30 Sep 2020 16:53:28 +0000 (18:53 +0200)
commite6cdb36c496a70d10acdadcc170c255e2d9a61c2
treea78f643fa7406643cc0eb2927140cb224867fa87
parent414f0c1ec0c1be7e055e52dbb6929cb9275492e3
leds: pca9532: correct shift computation in pca9532_getled

Each led setting occupies two bits in a corresponding led register.
Accessing these bits requires shifting and masking, which was
implemented incorrectly in pca9532_getled. Two new helper macros
concentrate the computation of those masks in one place.

Signed-off-by: Markus Moll <mmoll@de.pepperl-fuchs.com>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
drivers/leds/leds-pca9532.c