diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-30 09:15:08 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-05-13 10:10:36 -0300 |
commit | 3e0051c5a40a5a29e1919361f45cd1e103d0b1fa (patch) | |
tree | 5e0002c4c0012ad0d7241ea6aa04566f262f6650 /drivers/media/pci | |
parent | 6be5b1a19a4abe1b3c66af0bde3d7e3ed3005faa (diff) |
[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: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/saa7134/saa7134-i2c.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-i2c.c b/drivers/media/pci/saa7134/saa7134-i2c.c index b140143dba7d..ef3c33e3757d 100644 --- a/drivers/media/pci/saa7134/saa7134-i2c.c +++ b/drivers/media/pci/saa7134/saa7134-i2c.c @@ -369,13 +369,12 @@ saa7134_i2c_eeprom(struct saa7134_dev *dev, unsigned char *eedata, int len) dev->name,err); return -1; } - for (i = 0; i < len; i++) { - if (0 == (i % 16)) - pr_info("%s: i2c eeprom %02x:",dev->name,i); - printk(" %02x",eedata[i]); - if (15 == (i % 16)) - printk("\n"); + + for (i = 0; i < len; i+= 16) { + int size = (len - i) > 16 ? 16 : len - i; + pr_info("i2c eeprom %02x: %*ph\n", i, size, &eedata[i]); } + return 0; } |