From ed0e3729c9d790d17688083f070da3674088ea9c Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 1 Nov 2014 08:59:03 -0300 Subject: [media] cx231xx: Cleanup printk at the driver There are lots of debug printks printed with pr_info. Also, the printk's data are not too coherent: - there are duplicated driver name at the print format; - function name format string differs from function to function; - long strings broken into multiple lines; - some printks just produce ugly reports, being almost useless as-is. Do a cleanup on that. Still, there are much to be done in order to do a better printk job on this driver, but, at least it will now be a way less verbose, if debug printks are disabled, and some logs might actually be useful. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/cx231xx/cx231xx-i2c.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'drivers/media/usb/cx231xx/cx231xx-i2c.c') diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c index d4a468a60bd0..1a0d9efeb209 100644 --- a/drivers/media/usb/cx231xx/cx231xx-i2c.c +++ b/drivers/media/usb/cx231xx/cx231xx-i2c.c @@ -498,17 +498,18 @@ void cx231xx_do_i2c_scan(struct cx231xx *dev, int i2c_port) memset(&client, 0, sizeof(client)); client.adapter = cx231xx_get_i2c_adap(dev, i2c_port); - pr_info(": Checking for I2C devices on port=%d ..\n", i2c_port); + pr_info("i2c_scan: checking for I2C devices on port=%d ..\n", + i2c_port); for (i = 0; i < 128; i++) { client.addr = i; rc = i2c_master_recv(&client, &buf, 0); if (rc < 0) continue; - pr_info("%s: i2c scan: found device @ 0x%x [%s]\n", - dev->name, i << 1, - i2c_devs[i] ? i2c_devs[i] : "???"); + pr_info("i2c scan: found device @ 0x%x [%s]\n", + i << 1, + i2c_devs[i] ? i2c_devs[i] : "???"); } - pr_info(": Completed Checking for I2C devices on port=%d.\n", + pr_info("i2c scan: Completed Checking for I2C devices on port=%d.\n", i2c_port); } @@ -532,8 +533,7 @@ int cx231xx_i2c_register(struct cx231xx_i2c *bus) i2c_add_adapter(&bus->i2c_adap); if (0 != bus->i2c_rc) - pr_warn("%s: i2c bus %d register FAILED\n", - dev->name, bus->nr); + pr_warn("i2c bus %d register FAILED\n", bus->nr); return bus->i2c_rc; } @@ -576,8 +576,7 @@ int cx231xx_i2c_mux_register(struct cx231xx *dev, int mux_no) NULL); if (!dev->i2c_mux_adap[mux_no]) - pr_warn("%s: i2c mux %d register FAILED\n", - dev->name, mux_no); + pr_warn("i2c mux %d register FAILED\n", mux_no); return 0; } -- cgit v1.2.3