]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] cx23885: fix I2C scan printout
authorAntti Palosaari <crope@iki.fi>
Thu, 11 Dec 2014 18:44:51 +0000 (15:44 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Tue, 30 Dec 2014 12:46:52 +0000 (10:46 -0200)
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 <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/cx23885/cx23885-i2c.c

index fd71306af6e2f8facfc64964a8c05eb88fe3c146..1135ea3f6ce52297caa4f7fc4f974a72ab4376cb 100644 (file)
@@ -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] : "???");
        }
 }