diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-11-13 12:46:11 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-18 11:09:36 +0100 |
commit | e39682b5d96ae7a33a0f6b5578911913be8f14b6 (patch) | |
tree | b7aa9b903756aca9e874e132e0a604e307ef71b0 /drivers/media/pci/cx23885/cx23885-video.c | |
parent | gp8psk-fe: add missing MODULE_foo() macros (diff) | |
download | linux-e39682b5d96ae7a33a0f6b5578911913be8f14b6.tar.xz linux-e39682b5d96ae7a33a0f6b5578911913be8f14b6.zip |
[media] cx23885: convert it to use pr_foo() macros
Instead of calling printk() directly, use pr_foo()
macros, as suggested at the Kernel's coding style.
Please notice that a conversion to dev_foo() is not trivial,
as several parts on this driver uses pr_cont().
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/cx23885/cx23885-video.c')
-rw-r--r-- | drivers/media/pci/cx23885/cx23885-video.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index 92ff452e5886..ecc580af0148 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c @@ -15,6 +15,9 @@ * GNU General Public License for more details. */ +#include "cx23885.h" +#include "cx23885-video.h" + #include <linux/init.h> #include <linux/list.h> #include <linux/module.h> @@ -27,8 +30,6 @@ #include <linux/kthread.h> #include <asm/div64.h> -#include "cx23885.h" -#include "cx23885-video.h" #include <media/v4l2-common.h> #include <media/v4l2-ioctl.h> #include <media/v4l2-event.h> @@ -66,7 +67,8 @@ MODULE_PARM_DESC(vid_limit, "capture memory limit in megabytes"); #define dprintk(level, fmt, arg...)\ do { if (video_debug >= level)\ - printk(KERN_DEBUG "%s: " fmt, dev->name, ## arg);\ + printk(KERN_DEBUG pr_fmt("%s: video:" fmt), \ + __func__, ##arg); \ } while (0) /* ------------------------------------------------------------------- */ @@ -194,7 +196,7 @@ u8 cx23885_flatiron_read(struct cx23885_dev *dev, u8 reg) ret = i2c_transfer(&dev->i2c_bus[2].i2c_adap, &msg[0], 2); if (ret != 2) - printk(KERN_ERR "%s() error\n", __func__); + pr_err("%s() error\n", __func__); return b1[0]; } @@ -811,7 +813,6 @@ static int vidioc_log_status(struct file *file, void *priv) static int cx23885_query_audinput(struct file *file, void *priv, struct v4l2_audio *i) { - struct cx23885_dev *dev = video_drvdata(file); static const char *iname[] = { [0] = "Baseband L/R 1", [1] = "Baseband L/R 2", @@ -1000,7 +1001,7 @@ static int cx23885_set_freq_via_ops(struct cx23885_dev *dev, fe->ops.tuner_ops.set_analog_params(fe, ¶ms); } else - printk(KERN_ERR "%s() No analog tuner, aborting\n", __func__); + pr_err("%s() No analog tuner, aborting\n", __func__); /* When changing channels it is required to reset TVAUDIO */ msleep(100); @@ -1058,7 +1059,7 @@ int cx23885_video_irq(struct cx23885_dev *dev, u32 status) if (status & VID_BC_MSK_OPC_ERR) { dprintk(7, " (VID_BC_MSK_OPC_ERR 0x%08x)\n", VID_BC_MSK_OPC_ERR); - printk(KERN_WARNING "%s: video risc op code error\n", + pr_warn("%s: video risc op code error\n", dev->name); cx23885_sram_channel_dump(dev, &dev->sram_channels[SRAM_CH01]); @@ -1296,11 +1297,11 @@ int cx23885_video_register(struct cx23885_dev *dev) err = video_register_device(dev->video_dev, VFL_TYPE_GRABBER, video_nr[dev->nr]); if (err < 0) { - printk(KERN_INFO "%s: can't register video device\n", + pr_info("%s: can't register video device\n", dev->name); goto fail_unreg; } - printk(KERN_INFO "%s: registered device %s [v4l2]\n", + pr_info("%s: registered device %s [v4l2]\n", dev->name, video_device_node_name(dev->video_dev)); /* register VBI device */ @@ -1310,11 +1311,11 @@ int cx23885_video_register(struct cx23885_dev *dev) err = video_register_device(dev->vbi_dev, VFL_TYPE_VBI, vbi_nr[dev->nr]); if (err < 0) { - printk(KERN_INFO "%s: can't register vbi device\n", + pr_info("%s: can't register vbi device\n", dev->name); goto fail_unreg; } - printk(KERN_INFO "%s: registered device %s\n", + pr_info("%s: registered device %s\n", dev->name, video_device_node_name(dev->vbi_dev)); /* Register ALSA audio device */ |