Commit 82bc5196 authored by Christian Gmeiner's avatar Christian Gmeiner Committed by Greg Kroah-Hartman

drivers/leds/leds-ot200.c: fix error caused by shifted mask

commit 4b949b8a upstream.

During the development of this driver an in-house register documentation
was used.  The last week some integration tests were done and this
problem was found.  It turned out that the released register
documentation is wrong.

The fix is very simple: shift all masks by one.
Signed-off-by: default avatarChristian Gmeiner <christian.gmeiner@gmail.com>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 49adc03c
......@@ -47,37 +47,37 @@ static struct ot200_led leds[] = {
{
.name = "led_1",
.port = 0x49,
.mask = BIT(7),
.mask = BIT(6),
},
{
.name = "led_2",
.port = 0x49,
.mask = BIT(6),
.mask = BIT(5),
},
{
.name = "led_3",
.port = 0x49,
.mask = BIT(5),
.mask = BIT(4),
},
{
.name = "led_4",
.port = 0x49,
.mask = BIT(4),
.mask = BIT(3),
},
{
.name = "led_5",
.port = 0x49,
.mask = BIT(3),
.mask = BIT(2),
},
{
.name = "led_6",
.port = 0x49,
.mask = BIT(2),
.mask = BIT(1),
},
{
.name = "led_7",
.port = 0x49,
.mask = BIT(1),
.mask = BIT(0),
}
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment