aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-video.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-09-04 02:33:43 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:36:58 -0400
commitd45b9b8ab43c8973a9630ac54f4ede6c3e009f9e (patch)
treed5937a21d2d7520cc937a93ce7caa8665a96303f /drivers/media/video/cx23885/cx23885-video.c
parent2bb87c24d7d5639bff65b41b1306542d6d2bf7d0 (diff)
V4L/DVB (8906): v4l-dvb: fix assorted sparse warnings
Fix sparse warnings. None are serious, but cutting down on these helps find future serious sparse warnings/errors. Redid the av7710.c patch based on a suggestion by Oliver Endriss. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-video.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-video.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c
index d9bef1a54d1..f75ed1c9b71 100644
--- a/drivers/media/video/cx23885/cx23885-video.c
+++ b/drivers/media/video/cx23885/cx23885-video.c
@@ -244,7 +244,7 @@ static struct cx23885_ctrl cx23885_ctls[] = {
244}; 244};
245static const int CX23885_CTLS = ARRAY_SIZE(cx23885_ctls); 245static const int CX23885_CTLS = ARRAY_SIZE(cx23885_ctls);
246 246
247const u32 cx23885_user_ctrls[] = { 247static const u32 cx23885_user_ctrls[] = {
248 V4L2_CID_USER_CLASS, 248 V4L2_CID_USER_CLASS,
249 V4L2_CID_BRIGHTNESS, 249 V4L2_CID_BRIGHTNESS,
250 V4L2_CID_CONTRAST, 250 V4L2_CID_CONTRAST,
@@ -254,14 +254,13 @@ const u32 cx23885_user_ctrls[] = {
254 V4L2_CID_AUDIO_MUTE, 254 V4L2_CID_AUDIO_MUTE,
255 0 255 0
256}; 256};
257EXPORT_SYMBOL(cx23885_user_ctrls);
258 257
259static const u32 *ctrl_classes[] = { 258static const u32 *ctrl_classes[] = {
260 cx23885_user_ctrls, 259 cx23885_user_ctrls,
261 NULL 260 NULL
262}; 261};
263 262
264void cx23885_video_wakeup(struct cx23885_dev *dev, 263static void cx23885_video_wakeup(struct cx23885_dev *dev,
265 struct cx23885_dmaqueue *q, u32 count) 264 struct cx23885_dmaqueue *q, u32 count)
266{ 265{
267 struct cx23885_buffer *buf; 266 struct cx23885_buffer *buf;
@@ -296,7 +295,7 @@ void cx23885_video_wakeup(struct cx23885_dev *dev,
296 __func__, bc); 295 __func__, bc);
297} 296}
298 297
299int cx23885_set_tvnorm(struct cx23885_dev *dev, v4l2_std_id norm) 298static int cx23885_set_tvnorm(struct cx23885_dev *dev, v4l2_std_id norm)
300{ 299{
301 dprintk(1, "%s(norm = 0x%08x) name: [%s]\n", 300 dprintk(1, "%s(norm = 0x%08x) name: [%s]\n",
302 __func__, 301 __func__,
@@ -314,7 +313,7 @@ int cx23885_set_tvnorm(struct cx23885_dev *dev, v4l2_std_id norm)
314 return 0; 313 return 0;
315} 314}
316 315
317struct video_device *cx23885_vdev_init(struct cx23885_dev *dev, 316static struct video_device *cx23885_vdev_init(struct cx23885_dev *dev,
318 struct pci_dev *pci, 317 struct pci_dev *pci,
319 struct video_device *template, 318 struct video_device *template,
320 char *type) 319 char *type)
@@ -334,7 +333,7 @@ struct video_device *cx23885_vdev_init(struct cx23885_dev *dev,
334 return vfd; 333 return vfd;
335} 334}
336 335
337int cx23885_ctrl_query(struct v4l2_queryctrl *qctrl) 336static int cx23885_ctrl_query(struct v4l2_queryctrl *qctrl)
338{ 337{
339 int i; 338 int i;
340 339
@@ -351,7 +350,6 @@ int cx23885_ctrl_query(struct v4l2_queryctrl *qctrl)
351 *qctrl = cx23885_ctls[i].v; 350 *qctrl = cx23885_ctls[i].v;
352 return 0; 351 return 0;
353} 352}
354EXPORT_SYMBOL(cx23885_ctrl_query);
355 353
356/* ------------------------------------------------------------------- */ 354/* ------------------------------------------------------------------- */
357/* resource management */ 355/* resource management */
@@ -402,7 +400,7 @@ static void res_free(struct cx23885_dev *dev, struct cx23885_fh *fh,
402 mutex_unlock(&dev->lock); 400 mutex_unlock(&dev->lock);
403} 401}
404 402
405int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input) 403static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input)
406{ 404{
407 struct v4l2_routing route; 405 struct v4l2_routing route;
408 memset(&route, 0, sizeof(route)); 406 memset(&route, 0, sizeof(route));
@@ -422,10 +420,9 @@ int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input)
422 420
423 return 0; 421 return 0;
424} 422}
425EXPORT_SYMBOL(cx23885_video_mux);
426 423
427/* ------------------------------------------------------------------ */ 424/* ------------------------------------------------------------------ */
428int cx23885_set_scale(struct cx23885_dev *dev, unsigned int width, 425static int cx23885_set_scale(struct cx23885_dev *dev, unsigned int width,
429 unsigned int height, enum v4l2_field field) 426 unsigned int height, enum v4l2_field field)
430{ 427{
431 dprintk(1, "%s()\n", __func__); 428 dprintk(1, "%s()\n", __func__);
@@ -890,21 +887,19 @@ static int video_mmap(struct file *file, struct vm_area_struct *vma)
890/* ------------------------------------------------------------------ */ 887/* ------------------------------------------------------------------ */
891/* VIDEO CTRL IOCTLS */ 888/* VIDEO CTRL IOCTLS */
892 889
893int cx23885_get_control(struct cx23885_dev *dev, struct v4l2_control *ctl) 890static int cx23885_get_control(struct cx23885_dev *dev, struct v4l2_control *ctl)
894{ 891{
895 dprintk(1, "%s() calling cx25840(VIDIOC_G_CTRL)\n", __func__); 892 dprintk(1, "%s() calling cx25840(VIDIOC_G_CTRL)\n", __func__);
896 cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_G_CTRL, ctl); 893 cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_G_CTRL, ctl);
897 return 0; 894 return 0;
898} 895}
899EXPORT_SYMBOL(cx23885_get_control);
900 896
901int cx23885_set_control(struct cx23885_dev *dev, struct v4l2_control *ctl) 897static int cx23885_set_control(struct cx23885_dev *dev, struct v4l2_control *ctl)
902{ 898{
903 dprintk(1, "%s() calling cx25840(VIDIOC_S_CTRL)" 899 dprintk(1, "%s() calling cx25840(VIDIOC_S_CTRL)"
904 " (disabled - no action)\n", __func__); 900 " (disabled - no action)\n", __func__);
905 return 0; 901 return 0;
906} 902}
907EXPORT_SYMBOL(cx23885_set_control);
908 903
909static void init_controls(struct cx23885_dev *dev) 904static void init_controls(struct cx23885_dev *dev)
910{ 905{
@@ -1152,7 +1147,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id *tvnorms)
1152 return 0; 1147 return 0;
1153} 1148}
1154 1149
1155int cx23885_enum_input(struct cx23885_dev *dev, struct v4l2_input *i) 1150static int cx23885_enum_input(struct cx23885_dev *dev, struct v4l2_input *i)
1156{ 1151{
1157 static const char *iname[] = { 1152 static const char *iname[] = {
1158 [CX23885_VMUX_COMPOSITE1] = "Composite1", 1153 [CX23885_VMUX_COMPOSITE1] = "Composite1",
@@ -1185,7 +1180,6 @@ int cx23885_enum_input(struct cx23885_dev *dev, struct v4l2_input *i)
1185 i->std = CX23885_NORMS; 1180 i->std = CX23885_NORMS;
1186 return 0; 1181 return 0;
1187} 1182}
1188EXPORT_SYMBOL(cx23885_enum_input);
1189 1183
1190static int vidioc_enum_input(struct file *file, void *priv, 1184static int vidioc_enum_input(struct file *file, void *priv,
1191 struct v4l2_input *i) 1185 struct v4l2_input *i)
@@ -1294,7 +1288,7 @@ static int vidioc_g_frequency(struct file *file, void *priv,
1294 return 0; 1288 return 0;
1295} 1289}
1296 1290
1297int cx23885_set_freq(struct cx23885_dev *dev, struct v4l2_frequency *f) 1291static int cx23885_set_freq(struct cx23885_dev *dev, struct v4l2_frequency *f)
1298{ 1292{
1299 if (unlikely(UNSET == dev->tuner_type)) 1293 if (unlikely(UNSET == dev->tuner_type))
1300 return -EINVAL; 1294 return -EINVAL;
@@ -1313,7 +1307,6 @@ int cx23885_set_freq(struct cx23885_dev *dev, struct v4l2_frequency *f)
1313 1307
1314 return 0; 1308 return 0;
1315} 1309}
1316EXPORT_SYMBOL(cx23885_set_freq);
1317 1310
1318static int vidioc_s_frequency(struct file *file, void *priv, 1311static int vidioc_s_frequency(struct file *file, void *priv,
1319 struct v4l2_frequency *f) 1312 struct v4l2_frequency *f)