Skip to contentSkip to conversation

radeonfb: Give i2c buses nicer names

PATCH In review Jean Delvare 3 participants 5 messages Jun 6, 2008 – Jul 31, 2008 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 radeonfb: Give i2c buses nicer names

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

---
 drivers/video/aty/radeon_i2c.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/video/aty/radeon_i2c.c +2 -1
@@ -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;
Signature · 7 lines
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
Acked-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jean Delvare

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

Quoted 9 lines
---
 drivers/video/aty/radeon_i2c.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

drivers/video/aty/radeon_i2c.c static int radeon_setup_i2c_bus(struct r · line 76

Quoted 9 lines
drivers/video/aty/radeon_i2c.c +2 -1
@@ -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

#2 lore raw
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 4 lines · Jean Delvare

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

Hmm, does this mean that you won't take care of pushing the patch upstream? Driver maintainers usually do that...

Quoted 17 lines
Quoted 17 lines
---
 drivers/video/aty/radeon_i2c.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/video/aty/radeon_i2c.c +2 -1
@@ -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;
Signature · 7 lines
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
#3 lore raw
Quoted 11 lines · On Sun, 8 Jun 2008 15:50:56 +0200 Jean Delvare <[email protected]> wrote:
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 4 lines · Jean Delvare

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

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=/

#4 lore raw
Quoted 11 lines · Andrew Morton
Quoted 9 lines · On Sun, 8 Jun 2008 15:50:56 +0200 Jean Delvare <[email protected]> wrote:
Quoted 7 lines · Benjamin Herrenschmidt
Quoted 4 lines · Jean Delvare

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

Quoted 8 lines
Quoted 2 lines

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=/