summaryrefslogtreecommitdiff
path: root/drivers/media/usb/cx231xx/cx231xx-417.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-01 08:59:03 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-03 15:56:22 -0200
commited0e3729c9d790d17688083f070da3674088ea9c (patch)
treef6c25942baa88ded9a68c446d662fb8e338f40de /drivers/media/usb/cx231xx/cx231xx-417.c
parent88538bb5449caef8347a2785f7ac32c0b8d5858c (diff)
[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 <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-417.c')
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-417.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
index d678f4587ab4..a0d1156d1df1 100644
--- a/drivers/media/usb/cx231xx/cx231xx-417.c
+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
@@ -90,10 +90,10 @@ static unsigned int v4l_debug = 1;
module_param(v4l_debug, int, 0644);
MODULE_PARM_DESC(v4l_debug, "enable V4L debug messages");
-#define dprintk(level, fmt, arg...)\
- do { if (v4l_debug >= level) \
- pr_info("%s: " fmt, \
- (dev) ? dev->name : "cx231xx[?]", ## arg); \
+#define dprintk(level, fmt, arg...) \
+ do { \
+ if (v4l_debug >= level) \
+ printk(KERN_DEBUG pr_fmt(fmt), ## arg); \
} while (0)
static struct cx231xx_tvnorm cx231xx_tvnorms[] = {
@@ -1114,15 +1114,15 @@ static int cx231xx_initialize_codec(struct cx231xx *dev)
cx231xx_disable656(dev);
retval = cx231xx_api_cmd(dev, CX2341X_ENC_PING_FW, 0, 0); /* ping */
if (retval < 0) {
- dprintk(2, "%s() PING OK\n", __func__);
+ dprintk(2, "%s: PING OK\n", __func__);
retval = cx231xx_load_firmware(dev);
if (retval < 0) {
- pr_err("%s() f/w load failed\n", __func__);
+ pr_err("%s: f/w load failed\n", __func__);
return retval;
}
retval = cx231xx_find_mailbox(dev);
if (retval < 0) {
- pr_err("%s() mailbox < 0, error\n",
+ pr_err("%s: mailbox < 0, error\n",
__func__);
return -1;
}
@@ -1798,7 +1798,6 @@ static unsigned int mpeg_poll(struct file *file,
static int mpeg_mmap(struct file *file, struct vm_area_struct *vma)
{
struct cx231xx_fh *fh = file->private_data;
- struct cx231xx *dev = fh->dev;
dprintk(2, "%s()\n", __func__);