Skip to content

Commit

Permalink
drivers/leds/leds-ot200.c: fix error caused by shifted mask
Browse files Browse the repository at this point in the history
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: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
austriancoder authored and torvalds committed May 24, 2013
1 parent 7c34251 commit 4b949b8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/leds/leds-ot200.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
};

Expand Down

0 comments on commit 4b949b8

Please sign in to comment.