[PATCH] radeonfb: Give i2c buses nicer names

STALE6652d

5 messages, 3 authors, 2008-07-31 · open the first message on its own page

[PATCH] radeonfb: Give i2c buses nicer names

From: Jean Delvare <hidden>
Date: 2008-06-06 09:20:26

The name of the i2c buses shows in the output of "i2cdetect -l", so
it's important to give informative names.

Signed-off-by: Jean Delvare <redacted>
---
 drivers/video/aty/radeon_i2c.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--- linux-2.6.26-rc5.orig/drivers/video/aty/radeon_i2c.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc5/drivers/video/aty/radeon_i2c.c	2008-06-06 08:43:51.000000000 +0200
@@ -69,7 +69,8 @@ static int radeon_setup_i2c_bus(struct r
 {
 	int rc;
 
-	strcpy(chan->adapter.name, name);
+	snprintf(chan->adapter.name, sizeof(chan->adapter.name),
+		 "radeonfb %s", name);
 	chan->adapter.owner		= THIS_MODULE;
 	chan->adapter.id		= I2C_HW_B_RADEON;
 	chan->adapter.algo_data		= &chan->algo;

-- 
Jean Delvare

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Re: [PATCH] radeonfb: Give i2c buses nicer names

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2008-06-06 09:22:03

On Fri, 2008-06-06 at 11:19 +0200, Jean Delvare wrote:
The name of the i2c buses shows in the output of "i2cdetect -l", so
it's important to give informative names.

Signed-off-by: Jean Delvare <redacted>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
quoted hunk
---
 drivers/video/aty/radeon_i2c.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--- linux-2.6.26-rc5.orig/drivers/video/aty/radeon_i2c.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc5/drivers/video/aty/radeon_i2c.c	2008-06-06 08:43:51.000000000 +0200
@@ -69,7 +69,8 @@ static int radeon_setup_i2c_bus(struct r
 {
 	int rc;
 
-	strcpy(chan->adapter.name, name);
+	snprintf(chan->adapter.name, sizeof(chan->adapter.name),
+		 "radeonfb %s", name);
 	chan->adapter.owner		= THIS_MODULE;
 	chan->adapter.id		= I2C_HW_B_RADEON;
 	chan->adapter.algo_data		= &chan->algo;

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Re: [PATCH] radeonfb: Give i2c buses nicer names

From: Jean Delvare <hidden>
Date: 2008-06-08 13:51:22

On Fri, 06 Jun 2008 19:21:37 +1000, Benjamin Herrenschmidt wrote:
On Fri, 2008-06-06 at 11:19 +0200, Jean Delvare wrote:
quoted
The name of the i2c buses shows in the output of "i2cdetect -l", so
it's important to give informative names.

Signed-off-by: Jean Delvare <redacted>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Hmm, does this mean that you won't take care of pushing the patch
upstream? Driver maintainers usually do that...
quoted
---
 drivers/video/aty/radeon_i2c.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
--- linux-2.6.26-rc5.orig/drivers/video/aty/radeon_i2c.c	2008-06-03 09:57:31.000000000 +0200
+++ linux-2.6.26-rc5/drivers/video/aty/radeon_i2c.c	2008-06-06 08:43:51.000000000 +0200
@@ -69,7 +69,8 @@ static int radeon_setup_i2c_bus(struct r
 {
 	int rc;
 
-	strcpy(chan->adapter.name, name);
+	snprintf(chan->adapter.name, sizeof(chan->adapter.name),
+		 "radeonfb %s", name);
 	chan->adapter.owner		= THIS_MODULE;
 	chan->adapter.id		= I2C_HW_B_RADEON;
 	chan->adapter.algo_data		= &chan->algo;
-- 
Jean Delvare

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Re: [PATCH] radeonfb: Give i2c buses nicer names

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2008-07-31 08:58:16

On Sun, 8 Jun 2008 15:50:56 +0200 Jean Delvare [off-list ref] wrote:
On Fri, 06 Jun 2008 19:21:37 +1000, Benjamin Herrenschmidt wrote:
quoted
On Fri, 2008-06-06 at 11:19 +0200, Jean Delvare wrote:
quoted
The name of the i2c buses shows in the output of "i2cdetect -l", so
it's important to give informative names.

Signed-off-by: Jean Delvare <redacted>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Hmm, does this mean that you won't take care of pushing the patch
upstream? Driver maintainers usually do that...
Tony hasn't been heard from in many months and I only very occasionally
troll linux-fbdev-devel for lost things.

Is this patch still good?  If so, in which of
2.6.25/2.6.26/2.6.27/2.6.28 do you think it should be merged?



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Re: [PATCH] radeonfb: Give i2c buses nicer names

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2008-07-31 09:00:54

On Thu, 2008-07-31 at 01:57 -0700, Andrew Morton wrote:
On Sun, 8 Jun 2008 15:50:56 +0200 Jean Delvare [off-list ref] wrote:
quoted
On Fri, 06 Jun 2008 19:21:37 +1000, Benjamin Herrenschmidt wrote:
quoted
On Fri, 2008-06-06 at 11:19 +0200, Jean Delvare wrote:
quoted
The name of the i2c buses shows in the output of "i2cdetect -l", so
it's important to give informative names.

Signed-off-by: Jean Delvare <redacted>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Hmm, does this mean that you won't take care of pushing the patch
upstream? Driver maintainers usually do that...
Tony hasn't been heard from in many months and I only very occasionally
troll linux-fbdev-devel for lost things.

Is this patch still good?  If so, in which of
2.6.25/2.6.26/2.6.27/2.6.28 do you think it should be merged?
No objection here.

Ben.



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help