Browse Source

[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 <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Antti Palosaari 10 years ago
parent
commit
93009ca673
1 changed files with 2 additions and 2 deletions
  1. 2 2
      drivers/media/pci/cx23885/cx23885-i2c.c

+ 2 - 2
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] : "???");
 	}
 }