linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] leds-ot200: Fix error caused by shifted mask
@ 2012-12-06 13:21 Christian Gmeiner
  2012-12-13 11:55 ` Christian Gmeiner
  0 siblings, 1 reply; 13+ messages in thread
From: Christian Gmeiner @ 2012-12-06 13:21 UTC (permalink / raw)
  To: linux-next, akpm, rpurdie, linux-kernel; +Cc: Christian Gmeiner

During the development of this driver an in-house register
documentation was used. The last weeks 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>
---
 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


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [PATCH] leds-ot200: Fix error caused by shifted mask
@ 2013-01-23  8:10 Christian Gmeiner
  2013-01-23  7:53 ` AW: " GMEINER.Christian
  0 siblings, 1 reply; 13+ messages in thread
From: Christian Gmeiner @ 2013-01-23  8:10 UTC (permalink / raw)
  To: linux-next, akpm, rpurdie, linux-kernel, c.gmeiner; +Cc: Christian Gmeiner

During the development of this driver an in-house register
documentation was used. The last weeks 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>
---
 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 ee14662..98cae52 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.12.2.421.g261b511


^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [PATCH] leds-ot200: Fix error caused by shifted mask
@ 2012-10-01 12:50 Christian Gmeiner
  2012-10-01 15:25 ` Greg KH
  0 siblings, 1 reply; 13+ messages in thread
From: Christian Gmeiner @ 2012-10-01 12:50 UTC (permalink / raw)
  To: akpm, stable, rpurdie, linux-kernel; +Cc: Christian Gmeiner

During the development of this driver an in-house register
documentation was used. The last weeks 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 mask by one.

Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
---
 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.12.2.421.g261b511


^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-02-04 18:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-06 13:21 [PATCH] leds-ot200: Fix error caused by shifted mask Christian Gmeiner
2012-12-13 11:55 ` Christian Gmeiner
2012-12-17  8:13   ` Christian Gmeiner
2013-01-06 18:12     ` Christian Gmeiner
  -- strict thread matches above, loose matches on Subject: below --
2013-01-23  8:10 Christian Gmeiner
2013-01-23  7:53 ` AW: " GMEINER.Christian
2013-02-01 15:08   ` Christian Gmeiner
2013-02-01 22:12     ` Andrew Morton
2013-02-04 14:46       ` Christian Gmeiner
2013-02-04 18:27         ` Bryan Wu
2012-10-01 12:50 Christian Gmeiner
2012-10-01 15:25 ` Greg KH
2012-10-12  6:20   ` Christian Gmeiner
2012-10-30 19:08     ` Christian Gmeiner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).