From 589dadf299bc8dab27589ecd62024c96a3812505 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 1 Nov 2014 08:09:44 -0300 Subject: [media] cx231xx: get rid of driver-defined printk macros It currently does just like what pr_foo() macros do. So, replace them. A deeper cleanup is needed, as there are lots of debug macros printed with pr_info. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/cx231xx/cx231xx-video.c | 52 +++++++++++++++---------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'drivers/media/usb/cx231xx/cx231xx-video.c') diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index 3b3ada6562ca..bda5597b5eff 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c @@ -22,6 +22,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include "cx231xx.h" #include #include #include @@ -41,7 +42,6 @@ #include "dvb_frontend.h" -#include "cx231xx.h" #include "cx231xx-vbi.h" #define CX231XX_VERSION "0.0.2" @@ -737,7 +737,7 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb, if (!dev->video_mode.bulk_ctl.num_bufs) urb_init = 1; } - /*cx231xx_info("urb_init=%d dev->video_mode.max_pkt_size=%d\n", + /*pr_info("urb_init=%d dev->video_mode.max_pkt_size=%d\n", urb_init, dev->video_mode.max_pkt_size);*/ if (urb_init) { dev->mode_tv = 0; @@ -809,7 +809,7 @@ void video_mux(struct cx231xx *dev, int index) cx231xx_set_audio_input(dev, dev->ctl_ainput); - cx231xx_info("video_mux : %d\n", index); + pr_info("video_mux : %d\n", index); /* do mode control overrides if required */ cx231xx_do_mode_ctrl_overrides(dev); @@ -861,7 +861,7 @@ static void res_free(struct cx231xx_fh *fh) static int check_dev(struct cx231xx *dev) { if (dev->state & DEV_DISCONNECTED) { - cx231xx_errdev("v4l2 ioctl: device not present\n"); + pr_err("v4l2 ioctl: device not present\n"); return -ENODEV; } return 0; @@ -953,12 +953,12 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, return -EINVAL; if (videobuf_queue_is_busy(&fh->vb_vidq)) { - cx231xx_errdev("%s queue busy\n", __func__); + pr_err("%s queue busy\n", __func__); return -EBUSY; } if (dev->stream_on && !fh->stream_on) { - cx231xx_errdev("%s device in use by another fh\n", __func__); + pr_err("%s device in use by another fh\n", __func__); return -EBUSY; } @@ -1176,9 +1176,9 @@ int cx231xx_s_frequency(struct file *file, void *priv, int rc; u32 if_frequency = 5400000; - cx231xx_info("Enter vidioc_s_frequency()f->frequency=%d;f->type=%d\n", + pr_info("Enter vidioc_s_frequency()f->frequency=%d;f->type=%d\n", f->frequency, f->type); - /*cx231xx_info("f->type: 1-radio 2-analogTV 3-digitalTV\n");*/ + /*pr_info("f->type: 1-radio 2-analogTV 3-digitalTV\n");*/ rc = check_dev(dev); if (rc < 0) @@ -1213,13 +1213,13 @@ int cx231xx_s_frequency(struct file *file, void *priv, else if (dev->norm & V4L2_STD_SECAM_LC) if_frequency = 1250000; /*1.25MHz */ - cx231xx_info("if_frequency is set to %d\n", if_frequency); + pr_info("if_frequency is set to %d\n", if_frequency); cx231xx_set_Colibri_For_LowIF(dev, if_frequency, 1, 1); update_HH_register_after_set_DIF(dev); } - cx231xx_info("Set New FREQUENCY to %d\n", f->frequency); + pr_info("Set New FREQUENCY to %d\n", f->frequency); return rc; } @@ -1523,7 +1523,7 @@ static int vidioc_s_fmt_vbi_cap(struct file *file, void *priv, struct cx231xx *dev = fh->dev; if (dev->vbi_stream_on && !fh->stream_on) { - cx231xx_errdev("%s device in use by another fh\n", __func__); + pr_err("%s device in use by another fh\n", __func__); return -EBUSY; } return vidioc_try_fmt_vbi_cap(file, priv, f); @@ -1642,7 +1642,7 @@ static int cx231xx_v4l2_open(struct file *filp) #if 0 errCode = cx231xx_set_mode(dev, CX231XX_ANALOG_MODE); if (errCode < 0) { - cx231xx_errdev + pr_err ("Device locked on digital mode. Can't open analog\n"); return -EBUSY; } @@ -1650,7 +1650,7 @@ static int cx231xx_v4l2_open(struct file *filp) fh = kzalloc(sizeof(struct cx231xx_fh), GFP_KERNEL); if (!fh) { - cx231xx_errdev("cx231xx-video.c: Out of memory?!\n"); + pr_err("cx231xx-video.c: Out of memory?!\n"); return -ENOMEM; } if (mutex_lock_interruptible(&dev->lock)) { @@ -1736,7 +1736,7 @@ void cx231xx_release_analog_resources(struct cx231xx *dev) dev->radio_dev = NULL; } if (dev->vbi_dev) { - cx231xx_info("V4L2 device %s deregistered\n", + pr_info("V4L2 device %s deregistered\n", video_device_node_name(dev->vbi_dev)); if (video_is_registered(dev->vbi_dev)) video_unregister_device(dev->vbi_dev); @@ -1745,7 +1745,7 @@ void cx231xx_release_analog_resources(struct cx231xx *dev) dev->vbi_dev = NULL; } if (dev->vdev) { - cx231xx_info("V4L2 device %s deregistered\n", + pr_info("V4L2 device %s deregistered\n", video_device_node_name(dev->vdev)); if (dev->board.has_417) @@ -2080,7 +2080,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) { int ret; - cx231xx_info("%s: v4l2 driver version %s\n", + pr_info("%s: v4l2 driver version %s\n", dev->name, CX231XX_VERSION); /* set default norm */ @@ -2119,7 +2119,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) /* allocate and fill video video_device struct */ dev->vdev = cx231xx_vdev_init(dev, &cx231xx_video_template, "video"); if (!dev->vdev) { - cx231xx_errdev("cannot allocate video_device.\n"); + pr_err("cannot allocate video_device.\n"); return -ENODEV; } @@ -2128,12 +2128,12 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) ret = video_register_device(dev->vdev, VFL_TYPE_GRABBER, video_nr[dev->devno]); if (ret) { - cx231xx_errdev("unable to register video device (error=%i).\n", + pr_err("unable to register video device (error=%i).\n", ret); return ret; } - cx231xx_info("%s/0: registered device %s [v4l2]\n", + pr_info("%s/0: registered device %s [v4l2]\n", dev->name, video_device_node_name(dev->vdev)); /* Initialize VBI template */ @@ -2144,7 +2144,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) dev->vbi_dev = cx231xx_vdev_init(dev, &cx231xx_vbi_template, "vbi"); if (!dev->vbi_dev) { - cx231xx_errdev("cannot allocate video_device.\n"); + pr_err("cannot allocate video_device.\n"); return -ENODEV; } dev->vbi_dev->ctrl_handler = &dev->ctrl_handler; @@ -2152,32 +2152,32 @@ int cx231xx_register_analog_devices(struct cx231xx *dev) ret = video_register_device(dev->vbi_dev, VFL_TYPE_VBI, vbi_nr[dev->devno]); if (ret < 0) { - cx231xx_errdev("unable to register vbi device\n"); + pr_err("unable to register vbi device\n"); return ret; } - cx231xx_info("%s/0: registered device %s\n", + pr_info("%s/0: registered device %s\n", dev->name, video_device_node_name(dev->vbi_dev)); if (cx231xx_boards[dev->model].radio.type == CX231XX_RADIO) { dev->radio_dev = cx231xx_vdev_init(dev, &cx231xx_radio_template, "radio"); if (!dev->radio_dev) { - cx231xx_errdev("cannot allocate video_device.\n"); + pr_err("cannot allocate video_device.\n"); return -ENODEV; } dev->radio_dev->ctrl_handler = &dev->radio_ctrl_handler; ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO, radio_nr[dev->devno]); if (ret < 0) { - cx231xx_errdev("can't register radio device\n"); + pr_err("can't register radio device\n"); return ret; } - cx231xx_info("Registered radio device as %s\n", + pr_info("Registered radio device as %s\n", video_device_node_name(dev->radio_dev)); } - cx231xx_info("V4L2 device registered as %s and %s\n", + pr_info("V4L2 device registered as %s and %s\n", video_device_node_name(dev->vdev), video_device_node_name(dev->vbi_dev)); -- cgit v1.2.3