aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/cx231xx/cx231xx-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-01 07:09:44 -0400
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2014-11-03 12:55:23 -0500
commit589dadf299bc8dab27589ecd62024c96a3812505 (patch)
treeca4b1213906a970a6579a386716878a01f216d84 /drivers/media/usb/cx231xx/cx231xx-video.c
parentf2dd851ff19412bdc80471048283edbb465f812e (diff)
[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 <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/cx231xx/cx231xx-video.c')
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-video.c52
1 files changed, 26 insertions, 26 deletions
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 @@
22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 22 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 */ 23 */
24 24
25#include "cx231xx.h"
25#include <linux/init.h> 26#include <linux/init.h>
26#include <linux/list.h> 27#include <linux/list.h>
27#include <linux/module.h> 28#include <linux/module.h>
@@ -41,7 +42,6 @@
41 42
42#include "dvb_frontend.h" 43#include "dvb_frontend.h"
43 44
44#include "cx231xx.h"
45#include "cx231xx-vbi.h" 45#include "cx231xx-vbi.h"
46 46
47#define CX231XX_VERSION "0.0.2" 47#define CX231XX_VERSION "0.0.2"
@@ -737,7 +737,7 @@ buffer_prepare(struct videobuf_queue *vq, struct videobuf_buffer *vb,
737 if (!dev->video_mode.bulk_ctl.num_bufs) 737 if (!dev->video_mode.bulk_ctl.num_bufs)
738 urb_init = 1; 738 urb_init = 1;
739 } 739 }
740 /*cx231xx_info("urb_init=%d dev->video_mode.max_pkt_size=%d\n", 740 /*pr_info("urb_init=%d dev->video_mode.max_pkt_size=%d\n",
741 urb_init, dev->video_mode.max_pkt_size);*/ 741 urb_init, dev->video_mode.max_pkt_size);*/
742 if (urb_init) { 742 if (urb_init) {
743 dev->mode_tv = 0; 743 dev->mode_tv = 0;
@@ -809,7 +809,7 @@ void video_mux(struct cx231xx *dev, int index)
809 809
810 cx231xx_set_audio_input(dev, dev->ctl_ainput); 810 cx231xx_set_audio_input(dev, dev->ctl_ainput);
811 811
812 cx231xx_info("video_mux : %d\n", index); 812 pr_info("video_mux : %d\n", index);
813 813
814 /* do mode control overrides if required */ 814 /* do mode control overrides if required */
815 cx231xx_do_mode_ctrl_overrides(dev); 815 cx231xx_do_mode_ctrl_overrides(dev);
@@ -861,7 +861,7 @@ static void res_free(struct cx231xx_fh *fh)
861static int check_dev(struct cx231xx *dev) 861static int check_dev(struct cx231xx *dev)
862{ 862{
863 if (dev->state & DEV_DISCONNECTED) { 863 if (dev->state & DEV_DISCONNECTED) {
864 cx231xx_errdev("v4l2 ioctl: device not present\n"); 864 pr_err("v4l2 ioctl: device not present\n");
865 return -ENODEV; 865 return -ENODEV;
866 } 866 }
867 return 0; 867 return 0;
@@ -953,12 +953,12 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
953 return -EINVAL; 953 return -EINVAL;
954 954
955 if (videobuf_queue_is_busy(&fh->vb_vidq)) { 955 if (videobuf_queue_is_busy(&fh->vb_vidq)) {
956 cx231xx_errdev("%s queue busy\n", __func__); 956 pr_err("%s queue busy\n", __func__);
957 return -EBUSY; 957 return -EBUSY;
958 } 958 }
959 959
960 if (dev->stream_on && !fh->stream_on) { 960 if (dev->stream_on && !fh->stream_on) {
961 cx231xx_errdev("%s device in use by another fh\n", __func__); 961 pr_err("%s device in use by another fh\n", __func__);
962 return -EBUSY; 962 return -EBUSY;
963 } 963 }
964 964
@@ -1176,9 +1176,9 @@ int cx231xx_s_frequency(struct file *file, void *priv,
1176 int rc; 1176 int rc;
1177 u32 if_frequency = 5400000; 1177 u32 if_frequency = 5400000;
1178 1178
1179 cx231xx_info("Enter vidioc_s_frequency()f->frequency=%d;f->type=%d\n", 1179 pr_info("Enter vidioc_s_frequency()f->frequency=%d;f->type=%d\n",
1180 f->frequency, f->type); 1180 f->frequency, f->type);
1181 /*cx231xx_info("f->type: 1-radio 2-analogTV 3-digitalTV\n");*/ 1181 /*pr_info("f->type: 1-radio 2-analogTV 3-digitalTV\n");*/
1182 1182
1183 rc = check_dev(dev); 1183 rc = check_dev(dev);
1184 if (rc < 0) 1184 if (rc < 0)
@@ -1213,13 +1213,13 @@ int cx231xx_s_frequency(struct file *file, void *priv,
1213 else if (dev->norm & V4L2_STD_SECAM_LC) 1213 else if (dev->norm & V4L2_STD_SECAM_LC)
1214 if_frequency = 1250000; /*1.25MHz */ 1214 if_frequency = 1250000; /*1.25MHz */
1215 1215
1216 cx231xx_info("if_frequency is set to %d\n", if_frequency); 1216 pr_info("if_frequency is set to %d\n", if_frequency);
1217 cx231xx_set_Colibri_For_LowIF(dev, if_frequency, 1, 1); 1217 cx231xx_set_Colibri_For_LowIF(dev, if_frequency, 1, 1);
1218 1218
1219 update_HH_register_after_set_DIF(dev); 1219 update_HH_register_after_set_DIF(dev);
1220 } 1220 }
1221 1221
1222 cx231xx_info("Set New FREQUENCY to %d\n", f->frequency); 1222 pr_info("Set New FREQUENCY to %d\n", f->frequency);
1223 1223
1224 return rc; 1224 return rc;
1225} 1225}
@@ -1523,7 +1523,7 @@ static int vidioc_s_fmt_vbi_cap(struct file *file, void *priv,
1523 struct cx231xx *dev = fh->dev; 1523 struct cx231xx *dev = fh->dev;
1524 1524
1525 if (dev->vbi_stream_on && !fh->stream_on) { 1525 if (dev->vbi_stream_on && !fh->stream_on) {
1526 cx231xx_errdev("%s device in use by another fh\n", __func__); 1526 pr_err("%s device in use by another fh\n", __func__);
1527 return -EBUSY; 1527 return -EBUSY;
1528 } 1528 }
1529 return vidioc_try_fmt_vbi_cap(file, priv, f); 1529 return vidioc_try_fmt_vbi_cap(file, priv, f);
@@ -1642,7 +1642,7 @@ static int cx231xx_v4l2_open(struct file *filp)
1642#if 0 1642#if 0
1643 errCode = cx231xx_set_mode(dev, CX231XX_ANALOG_MODE); 1643 errCode = cx231xx_set_mode(dev, CX231XX_ANALOG_MODE);
1644 if (errCode < 0) { 1644 if (errCode < 0) {
1645 cx231xx_errdev 1645 pr_err
1646 ("Device locked on digital mode. Can't open analog\n"); 1646 ("Device locked on digital mode. Can't open analog\n");
1647 return -EBUSY; 1647 return -EBUSY;
1648 } 1648 }
@@ -1650,7 +1650,7 @@ static int cx231xx_v4l2_open(struct file *filp)
1650 1650
1651 fh = kzalloc(sizeof(struct cx231xx_fh), GFP_KERNEL); 1651 fh = kzalloc(sizeof(struct cx231xx_fh), GFP_KERNEL);
1652 if (!fh) { 1652 if (!fh) {
1653 cx231xx_errdev("cx231xx-video.c: Out of memory?!\n"); 1653 pr_err("cx231xx-video.c: Out of memory?!\n");
1654 return -ENOMEM; 1654 return -ENOMEM;
1655 } 1655 }
1656 if (mutex_lock_interruptible(&dev->lock)) { 1656 if (mutex_lock_interruptible(&dev->lock)) {
@@ -1736,7 +1736,7 @@ void cx231xx_release_analog_resources(struct cx231xx *dev)
1736 dev->radio_dev = NULL; 1736 dev->radio_dev = NULL;
1737 } 1737 }
1738 if (dev->vbi_dev) { 1738 if (dev->vbi_dev) {
1739 cx231xx_info("V4L2 device %s deregistered\n", 1739 pr_info("V4L2 device %s deregistered\n",
1740 video_device_node_name(dev->vbi_dev)); 1740 video_device_node_name(dev->vbi_dev));
1741 if (video_is_registered(dev->vbi_dev)) 1741 if (video_is_registered(dev->vbi_dev))
1742 video_unregister_device(dev->vbi_dev); 1742 video_unregister_device(dev->vbi_dev);
@@ -1745,7 +1745,7 @@ void cx231xx_release_analog_resources(struct cx231xx *dev)
1745 dev->vbi_dev = NULL; 1745 dev->vbi_dev = NULL;
1746 } 1746 }
1747 if (dev->vdev) { 1747 if (dev->vdev) {
1748 cx231xx_info("V4L2 device %s deregistered\n", 1748 pr_info("V4L2 device %s deregistered\n",
1749 video_device_node_name(dev->vdev)); 1749 video_device_node_name(dev->vdev));
1750 1750
1751 if (dev->board.has_417) 1751 if (dev->board.has_417)
@@ -2080,7 +2080,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
2080{ 2080{
2081 int ret; 2081 int ret;
2082 2082
2083 cx231xx_info("%s: v4l2 driver version %s\n", 2083 pr_info("%s: v4l2 driver version %s\n",
2084 dev->name, CX231XX_VERSION); 2084 dev->name, CX231XX_VERSION);
2085 2085
2086 /* set default norm */ 2086 /* set default norm */
@@ -2119,7 +2119,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
2119 /* allocate and fill video video_device struct */ 2119 /* allocate and fill video video_device struct */
2120 dev->vdev = cx231xx_vdev_init(dev, &cx231xx_video_template, "video"); 2120 dev->vdev = cx231xx_vdev_init(dev, &cx231xx_video_template, "video");
2121 if (!dev->vdev) { 2121 if (!dev->vdev) {
2122 cx231xx_errdev("cannot allocate video_device.\n"); 2122 pr_err("cannot allocate video_device.\n");
2123 return -ENODEV; 2123 return -ENODEV;
2124 } 2124 }
2125 2125
@@ -2128,12 +2128,12 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
2128 ret = video_register_device(dev->vdev, VFL_TYPE_GRABBER, 2128 ret = video_register_device(dev->vdev, VFL_TYPE_GRABBER,
2129 video_nr[dev->devno]); 2129 video_nr[dev->devno]);
2130 if (ret) { 2130 if (ret) {
2131 cx231xx_errdev("unable to register video device (error=%i).\n", 2131 pr_err("unable to register video device (error=%i).\n",
2132 ret); 2132 ret);
2133 return ret; 2133 return ret;
2134 } 2134 }
2135 2135
2136 cx231xx_info("%s/0: registered device %s [v4l2]\n", 2136 pr_info("%s/0: registered device %s [v4l2]\n",
2137 dev->name, video_device_node_name(dev->vdev)); 2137 dev->name, video_device_node_name(dev->vdev));
2138 2138
2139 /* Initialize VBI template */ 2139 /* Initialize VBI template */
@@ -2144,7 +2144,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
2144 dev->vbi_dev = cx231xx_vdev_init(dev, &cx231xx_vbi_template, "vbi"); 2144 dev->vbi_dev = cx231xx_vdev_init(dev, &cx231xx_vbi_template, "vbi");
2145 2145
2146 if (!dev->vbi_dev) { 2146 if (!dev->vbi_dev) {
2147 cx231xx_errdev("cannot allocate video_device.\n"); 2147 pr_err("cannot allocate video_device.\n");
2148 return -ENODEV; 2148 return -ENODEV;
2149 } 2149 }
2150 dev->vbi_dev->ctrl_handler = &dev->ctrl_handler; 2150 dev->vbi_dev->ctrl_handler = &dev->ctrl_handler;
@@ -2152,32 +2152,32 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
2152 ret = video_register_device(dev->vbi_dev, VFL_TYPE_VBI, 2152 ret = video_register_device(dev->vbi_dev, VFL_TYPE_VBI,
2153 vbi_nr[dev->devno]); 2153 vbi_nr[dev->devno]);
2154 if (ret < 0) { 2154 if (ret < 0) {
2155 cx231xx_errdev("unable to register vbi device\n"); 2155 pr_err("unable to register vbi device\n");
2156 return ret; 2156 return ret;
2157 } 2157 }
2158 2158
2159 cx231xx_info("%s/0: registered device %s\n", 2159 pr_info("%s/0: registered device %s\n",
2160 dev->name, video_device_node_name(dev->vbi_dev)); 2160 dev->name, video_device_node_name(dev->vbi_dev));
2161 2161
2162 if (cx231xx_boards[dev->model].radio.type == CX231XX_RADIO) { 2162 if (cx231xx_boards[dev->model].radio.type == CX231XX_RADIO) {
2163 dev->radio_dev = cx231xx_vdev_init(dev, &cx231xx_radio_template, 2163 dev->radio_dev = cx231xx_vdev_init(dev, &cx231xx_radio_template,
2164 "radio"); 2164 "radio");
2165 if (!dev->radio_dev) { 2165 if (!dev->radio_dev) {
2166 cx231xx_errdev("cannot allocate video_device.\n"); 2166 pr_err("cannot allocate video_device.\n");
2167 return -ENODEV; 2167 return -ENODEV;
2168 } 2168 }
2169 dev->radio_dev->ctrl_handler = &dev->radio_ctrl_handler; 2169 dev->radio_dev->ctrl_handler = &dev->radio_ctrl_handler;
2170 ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO, 2170 ret = video_register_device(dev->radio_dev, VFL_TYPE_RADIO,
2171 radio_nr[dev->devno]); 2171 radio_nr[dev->devno]);
2172 if (ret < 0) { 2172 if (ret < 0) {
2173 cx231xx_errdev("can't register radio device\n"); 2173 pr_err("can't register radio device\n");
2174 return ret; 2174 return ret;
2175 } 2175 }
2176 cx231xx_info("Registered radio device as %s\n", 2176 pr_info("Registered radio device as %s\n",
2177 video_device_node_name(dev->radio_dev)); 2177 video_device_node_name(dev->radio_dev));
2178 } 2178 }
2179 2179
2180 cx231xx_info("V4L2 device registered as %s and %s\n", 2180 pr_info("V4L2 device registered as %s and %s\n",
2181 video_device_node_name(dev->vdev), 2181 video_device_node_name(dev->vdev),
2182 video_device_node_name(dev->vbi_dev)); 2182 video_device_node_name(dev->vbi_dev));
2183 2183