diff options
author | Matthias Schwarzott <zzam@gentoo.org> | 2014-10-02 07:20:56 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-10-30 20:12:21 +0100 |
commit | 8da4f2d58d53e74192ba0310e8cb10b7d495b26d (patch) | |
tree | fc79e0e7fe05b2feaad0142baa77876e20c1455c /drivers/media/usb | |
parent | [media] cx231xx: delete i2c_client per bus (diff) | |
download | linux-8da4f2d58d53e74192ba0310e8cb10b7d495b26d.tar.xz linux-8da4f2d58d53e74192ba0310e8cb10b7d495b26d.zip |
[media] cx231xx: give each master i2c bus a seperate name
Instead of using the same name for all 3 i2c physical buses
inside cx231xx, name them differently, adding a number
to it. This helps to better deal with the logs.
[mchehab@osg.samsung.com: removed an unused bus_name var from
the original patch]
Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Reviewed-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb')
-rw-r--r-- | drivers/media/usb/cx231xx/cx231xx-i2c.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c index a30d40082e5d..45057167227c 100644 --- a/drivers/media/usb/cx231xx/cx231xx-i2c.c +++ b/drivers/media/usb/cx231xx/cx231xx-i2c.c @@ -512,7 +512,7 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus) bus->i2c_adap = cx231xx_adap_template; bus->i2c_adap.dev.parent = &dev->udev->dev; - strlcpy(bus->i2c_adap.name, bus->dev->name, sizeof(bus->i2c_adap.name)); + snprintf(bus->i2c_adap.name, sizeof(bus->i2c_adap.name), "%s-%d", bus->dev->name, bus->nr); bus->i2c_adap.algo_data = bus; i2c_set_adapdata(&bus->i2c_adap, &dev->v4l2_dev); |