From: Antti Palosaari Date: Thu, 11 Dec 2014 18:44:51 +0000 (-0300) Subject: [media] cx23885: fix I2C scan printout X-Git-Tag: v4.0-rc1~130^2~233 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=93009ca673394f0bfb99aa8d8e76f3581a2b38e8;p=karo-tx-linux.git [media] cx23885: fix I2C scan printout 1) I2C slave addresses were printed so called 8-bit format. Use standard 7-bit notation. 2) I2C slave address was printed with hex formatted without leading zeros, which makes output one digit shorter in a case of address fit to one hex digit. Use 4 char wide hex number with leading zeros as usually used for I2C slave addresses. Signed-off-by: Antti Palosaari Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/pci/cx23885/cx23885-i2c.c b/drivers/media/pci/cx23885/cx23885-i2c.c index fd71306af6e2..1135ea3f6ce5 100644 --- a/drivers/media/pci/cx23885/cx23885-i2c.c +++ b/drivers/media/pci/cx23885/cx23885-i2c.c @@ -300,8 +300,8 @@ static void do_i2c_scan(char *name, struct i2c_client *c) rc = i2c_master_recv(c, &buf, 0); if (rc < 0) continue; - printk(KERN_INFO "%s: i2c scan: found device @ 0x%x [%s]\n", - name, i << 1, i2c_devs[i] ? i2c_devs[i] : "???"); + printk(KERN_INFO "%s: i2c scan: found device @ 0x%04x [%s]\n", + name, i, i2c_devs[i] ? i2c_devs[i] : "???"); } }