lkml.org 
[lkml]   [2013]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[024/141] drivers/leds/leds-ot200.c: fix error caused by shifted mask
    3.6.11.6 stable review patch.
    If anyone has any objections, please let me know.

    ------------------

    From: Christian Gmeiner <christian.gmeiner@gmail.com>

    [ Upstream commit 4b949b8af12e24b8a48fa5bb775a13b558d9f4da ]

    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>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
    ---
    drivers/leds/leds-ot200.c | 14 +++++++-------
    1 file changed, 7 insertions(+), 7 deletions(-)

    diff --git a/drivers/leds/leds-ot200.c b/drivers/leds/leds-ot200.c
    index c464682..676e729 100644
    --- a/drivers/leds/leds-ot200.c
    +++ b/drivers/leds/leds-ot200.c
    @@ -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),
    }
    };

    --
    1.7.10.4



    \
     
     \ /
      Last update: 2013-07-03 21:21    [W:3.866 / U:0.264 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site