]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
radeonfb: give i2c buses nicer names
authorJean Delvare <khali@linux-fr.org>
Tue, 5 Aug 2008 20:01:27 +0000 (13:01 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 5 Aug 2008 21:33:49 +0000 (14:33 -0700)
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 <khali@linux-fr.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/aty/radeon_i2c.c

index f9e7c29ad9bf8eb516c8d386c460426f7cfcd925..8c8fa35f1b7c2b13cd6a35341abddcf7ca42d9f5 100644 (file)
@@ -69,7 +69,8 @@ static int radeon_setup_i2c_bus(struct radeon_i2c_chan *chan, const char *name)
 {
        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;