From: Jean Delvare Date: Tue, 5 Aug 2008 20:01:27 +0000 (-0700) Subject: radeonfb: give i2c buses nicer names X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9bd6ceb666e76b9a3caefa158827a571ead55b6a;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git 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. Signed-off-by: Jean Delvare Acked-by: Benjamin Herrenschmidt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/aty/radeon_i2c.c b/drivers/video/aty/radeon_i2c.c index f9e7c29ad9b..8c8fa35f1b7 100644 --- a/drivers/video/aty/radeon_i2c.c +++ b/drivers/video/aty/radeon_i2c.c @@ -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;