Commit 3e0051c5 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] saa7134-i2c: simplify debug dump and use pr_info()

Instead of implement its own hexdump logic, use the printk
format, and convert to use pr_info().
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 6be5b1a1
...@@ -369,13 +369,12 @@ saa7134_i2c_eeprom(struct saa7134_dev *dev, unsigned char *eedata, int len) ...@@ -369,13 +369,12 @@ saa7134_i2c_eeprom(struct saa7134_dev *dev, unsigned char *eedata, int len)
dev->name,err); dev->name,err);
return -1; return -1;
} }
for (i = 0; i < len; i++) {
if (0 == (i % 16)) for (i = 0; i < len; i+= 16) {
pr_info("%s: i2c eeprom %02x:",dev->name,i); int size = (len - i) > 16 ? 16 : len - i;
printk(" %02x",eedata[i]); pr_info("i2c eeprom %02x: %*ph\n", i, size, &eedata[i]);
if (15 == (i % 16))
printk("\n");
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment