提交 93009ca6 编写于 作者: A Antti Palosaari 提交者: Mauro Carvalho Chehab

[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: NAntti Palosaari <crope@iki.fi>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 a593f2cf
...@@ -300,8 +300,8 @@ static void do_i2c_scan(char *name, struct i2c_client *c) ...@@ -300,8 +300,8 @@ static void do_i2c_scan(char *name, struct i2c_client *c)
rc = i2c_master_recv(c, &buf, 0); rc = i2c_master_recv(c, &buf, 0);
if (rc < 0) if (rc < 0)
continue; continue;
printk(KERN_INFO "%s: i2c scan: found device @ 0x%x [%s]\n", printk(KERN_INFO "%s: i2c scan: found device @ 0x%04x [%s]\n",
name, i << 1, i2c_devs[i] ? i2c_devs[i] : "???"); name, i, i2c_devs[i] ? i2c_devs[i] : "???");
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册