aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-02 06:34:34 -0500
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-03 12:59:35 -0500
commitac550faabd7cc63f3726e21063931cb0d286c59d (patch)
tree5323c447157ae1925f7b505c882461a6c8867b32 /drivers/media
parent3d28cf3ee6e7f8f1d43aaf42a79fe39ddd6350bf (diff)
[media] cx231xx: simplify I2C scan debug messages
Don't need to show when it starts or stops. Just print lines when devices are found. After the changes, the output for i2c scan will be like: usb 1-2: i2c scan: found device @ port 0 addr 0x40 [???] usb 1-2: i2c scan: found device @ port 0 addr 0x60 [colibri] usb 1-2: i2c scan: found device @ port 0 addr 0x88 [hammerhead] usb 1-2: i2c scan: found device @ port 0 addr 0x98 [???] usb 1-2: i2c scan: found device @ port 3 addr 0xa0 [eeprom] usb 1-2: i2c scan: found device @ port 2 addr 0x60 [colibri] usb 1-2: i2c scan: found device @ port 2 addr 0xc0 [tuner] usb 1-2: i2c scan: found device @ port 4 addr 0x20 [demod] Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-i2c.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c
index 87b26157cad0..7ccc33d33664 100644
--- a/drivers/media/usb/cx231xx/cx231xx-i2c.c
+++ b/drivers/media/usb/cx231xx/cx231xx-i2c.c
@@ -502,21 +502,17 @@ void cx231xx_do_i2c_scan(struct cx231xx *dev, int i2c_port)
502 memset(&client, 0, sizeof(client)); 502 memset(&client, 0, sizeof(client));
503 client.adapter = cx231xx_get_i2c_adap(dev, i2c_port); 503 client.adapter = cx231xx_get_i2c_adap(dev, i2c_port);
504 504
505 dev_info(&dev->udev->dev,
506 "i2c_scan: checking for I2C devices on port=%d ..\n",
507 i2c_port);
508 for (i = 0; i < 128; i++) { 505 for (i = 0; i < 128; i++) {
509 client.addr = i; 506 client.addr = i;
510 rc = i2c_master_recv(&client, &buf, 0); 507 rc = i2c_master_recv(&client, &buf, 0);
511 if (rc < 0) 508 if (rc < 0)
512 continue; 509 continue;
513 dev_info(&dev->udev->dev, 510 dev_info(&dev->udev->dev,
514 "i2c scan: found device @ 0x%x [%s]\n", 511 "i2c scan: found device @ port %d addr 0x%x [%s]\n",
512 i2c_port,
515 i << 1, 513 i << 1,
516 i2c_devs[i] ? i2c_devs[i] : "???"); 514 i2c_devs[i] ? i2c_devs[i] : "???");
517 } 515 }
518 dev_info(&dev->udev->dev, "i2c scan: Completed Checking for I2C devices on port=%d.\n",
519 i2c_port);
520 516
521 dev->i2c_scan_running = false; 517 dev->i2c_scan_running = false;
522} 518}