diff options
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/cx88/cx88-video.c | 4 | ||||
-rw-r--r-- | drivers/media/video/msp3400-driver.c | 10 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-video.c | 2 | ||||
-rw-r--r-- | drivers/media/video/tuner-core.c | 23 | ||||
-rw-r--r-- | drivers/media/video/v4l2-common.c | 24 | ||||
-rw-r--r-- | drivers/media/video/videodev.c | 8 | ||||
-rw-r--r-- | drivers/media/video/vivi.c | 4 |
7 files changed, 46 insertions, 29 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c index 2225d4b94140..ff4e7ed76b08 100644 --- a/drivers/media/video/cx88/cx88-video.c +++ b/drivers/media/video/cx88/cx88-video.c | |||
@@ -1226,7 +1226,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, | |||
1226 | struct v4l2_format *f = arg; | 1226 | struct v4l2_format *f = arg; |
1227 | return cx8800_try_fmt(dev,fh,f); | 1227 | return cx8800_try_fmt(dev,fh,f); |
1228 | } | 1228 | } |
1229 | #ifdef HAVE_V4L1 | 1229 | #ifdef CONFIG_V4L1_COMPAT |
1230 | /* --- streaming capture ------------------------------------- */ | 1230 | /* --- streaming capture ------------------------------------- */ |
1231 | case VIDIOCGMBUF: | 1231 | case VIDIOCGMBUF: |
1232 | { | 1232 | { |
@@ -1585,7 +1585,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file, | |||
1585 | *id = 0; | 1585 | *id = 0; |
1586 | return 0; | 1586 | return 0; |
1587 | } | 1587 | } |
1588 | #ifdef HAVE_V4L1 | 1588 | #ifdef CONFIG_V4L1_COMPAT |
1589 | case VIDIOCSTUNER: | 1589 | case VIDIOCSTUNER: |
1590 | { | 1590 | { |
1591 | struct video_tuner *v = arg; | 1591 | struct video_tuner *v = arg; |
diff --git a/drivers/media/video/msp3400-driver.c b/drivers/media/video/msp3400-driver.c index dbb75a7db199..56246b8578f3 100644 --- a/drivers/media/video/msp3400-driver.c +++ b/drivers/media/video/msp3400-driver.c | |||
@@ -362,7 +362,7 @@ int msp_sleep(struct msp_state *state, int timeout) | |||
362 | } | 362 | } |
363 | 363 | ||
364 | /* ------------------------------------------------------------------------ */ | 364 | /* ------------------------------------------------------------------------ */ |
365 | 365 | #ifdef CONFIG_VIDEO_V4L1 | |
366 | static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode) | 366 | static int msp_mode_v4l2_to_v4l1(int rxsubchans, int audmode) |
367 | { | 367 | { |
368 | if (rxsubchans == V4L2_TUNER_SUB_MONO) | 368 | if (rxsubchans == V4L2_TUNER_SUB_MONO) |
@@ -384,6 +384,7 @@ static int msp_mode_v4l1_to_v4l2(int mode) | |||
384 | return V4L2_TUNER_MODE_LANG1; | 384 | return V4L2_TUNER_MODE_LANG1; |
385 | return V4L2_TUNER_MODE_MONO; | 385 | return V4L2_TUNER_MODE_MONO; |
386 | } | 386 | } |
387 | #endif | ||
387 | 388 | ||
388 | static int msp_get_ctrl(struct i2c_client *client, struct v4l2_control *ctrl) | 389 | static int msp_get_ctrl(struct i2c_client *client, struct v4l2_control *ctrl) |
389 | { | 390 | { |
@@ -509,6 +510,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
509 | /* --- v4l ioctls --- */ | 510 | /* --- v4l ioctls --- */ |
510 | /* take care: bttv does userspace copying, we'll get a | 511 | /* take care: bttv does userspace copying, we'll get a |
511 | kernel pointer here... */ | 512 | kernel pointer here... */ |
513 | #ifdef CONFIG_VIDEO_V4L1 | ||
512 | case VIDIOCGAUDIO: | 514 | case VIDIOCGAUDIO: |
513 | { | 515 | { |
514 | struct video_audio *va = arg; | 516 | struct video_audio *va = arg; |
@@ -577,6 +579,12 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
577 | } | 579 | } |
578 | 580 | ||
579 | case VIDIOCSFREQ: | 581 | case VIDIOCSFREQ: |
582 | { | ||
583 | /* new channel -- kick audio carrier scan */ | ||
584 | msp_wake_thread(client); | ||
585 | break; | ||
586 | } | ||
587 | #endif | ||
580 | case VIDIOC_S_FREQUENCY: | 588 | case VIDIOC_S_FREQUENCY: |
581 | { | 589 | { |
582 | /* new channel -- kick audio carrier scan */ | 590 | /* new channel -- kick audio carrier scan */ |
diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index 82779585a97f..8656f2400e18 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c | |||
@@ -2087,7 +2087,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file, | |||
2087 | struct v4l2_format *f = arg; | 2087 | struct v4l2_format *f = arg; |
2088 | return saa7134_try_fmt(dev,fh,f); | 2088 | return saa7134_try_fmt(dev,fh,f); |
2089 | } | 2089 | } |
2090 | #ifdef HAVE_V4L1 | 2090 | #ifdef CONFIG_V4L1_COMPAT |
2091 | case VIDIOCGMBUF: | 2091 | case VIDIOCGMBUF: |
2092 | { | 2092 | { |
2093 | struct video_mbuf *mbuf = arg; | 2093 | struct video_mbuf *mbuf = arg; |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 277d35106bde..40590bae5ff7 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -590,6 +590,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
590 | if (t->standby) | 590 | if (t->standby) |
591 | t->standby (client); | 591 | t->standby (client); |
592 | break; | 592 | break; |
593 | #ifdef CONFIG_VIDEO_V4L1 | ||
593 | case VIDIOCSAUDIO: | 594 | case VIDIOCSAUDIO: |
594 | if (check_mode(t, "VIDIOCSAUDIO") == EINVAL) | 595 | if (check_mode(t, "VIDIOCSAUDIO") == EINVAL) |
595 | return 0; | 596 | return 0; |
@@ -599,17 +600,6 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
599 | /* Should be implemented, since bttv calls it */ | 600 | /* Should be implemented, since bttv calls it */ |
600 | tuner_dbg("VIDIOCSAUDIO not implemented.\n"); | 601 | tuner_dbg("VIDIOCSAUDIO not implemented.\n"); |
601 | break; | 602 | break; |
602 | case TDA9887_SET_CONFIG: | ||
603 | if (t->type == TUNER_TDA9887) { | ||
604 | int *i = arg; | ||
605 | |||
606 | t->tda9887_config = *i; | ||
607 | set_freq(client, t->tv_freq); | ||
608 | } | ||
609 | break; | ||
610 | /* --- v4l ioctls --- */ | ||
611 | /* take care: bttv does userspace copying, we'll get a | ||
612 | kernel pointer here... */ | ||
613 | case VIDIOCSCHAN: | 603 | case VIDIOCSCHAN: |
614 | { | 604 | { |
615 | static const v4l2_std_id map[] = { | 605 | static const v4l2_std_id map[] = { |
@@ -693,7 +683,18 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
693 | ? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO; | 683 | ? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO; |
694 | return 0; | 684 | return 0; |
695 | } | 685 | } |
686 | #endif | ||
687 | case TDA9887_SET_CONFIG: | ||
688 | if (t->type == TUNER_TDA9887) { | ||
689 | int *i = arg; | ||
696 | 690 | ||
691 | t->tda9887_config = *i; | ||
692 | set_freq(client, t->tv_freq); | ||
693 | } | ||
694 | break; | ||
695 | /* --- v4l ioctls --- */ | ||
696 | /* take care: bttv does userspace copying, we'll get a | ||
697 | kernel pointer here... */ | ||
697 | case VIDIOC_S_STD: | 698 | case VIDIOC_S_STD: |
698 | { | 699 | { |
699 | v4l2_std_id *id = arg; | 700 | v4l2_std_id *id = arg; |
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c index f06dc19e504a..2ecbeffb559e 100644 --- a/drivers/media/video/v4l2-common.c +++ b/drivers/media/video/v4l2-common.c | |||
@@ -202,7 +202,7 @@ static char *v4l2_memory_names[] = { | |||
202 | /* ------------------------------------------------------------------ */ | 202 | /* ------------------------------------------------------------------ */ |
203 | /* debug help functions */ | 203 | /* debug help functions */ |
204 | 204 | ||
205 | #ifdef HAVE_V4L1 | 205 | #ifdef CONFIG_V4L1_COMPAT |
206 | static const char *v4l1_ioctls[] = { | 206 | static const char *v4l1_ioctls[] = { |
207 | [_IOC_NR(VIDIOCGCAP)] = "VIDIOCGCAP", | 207 | [_IOC_NR(VIDIOCGCAP)] = "VIDIOCGCAP", |
208 | [_IOC_NR(VIDIOCGCHAN)] = "VIDIOCGCHAN", | 208 | [_IOC_NR(VIDIOCGCHAN)] = "VIDIOCGCHAN", |
@@ -301,7 +301,7 @@ static const char *v4l2_ioctls[] = { | |||
301 | #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) | 301 | #define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls) |
302 | 302 | ||
303 | static const char *v4l2_int_ioctls[] = { | 303 | static const char *v4l2_int_ioctls[] = { |
304 | #ifdef HAVE_VIDEO_DECODER | 304 | #ifdef CONFIG_V4L1_COMPAT |
305 | [_IOC_NR(DECODER_GET_CAPABILITIES)] = "DECODER_GET_CAPABILITIES", | 305 | [_IOC_NR(DECODER_GET_CAPABILITIES)] = "DECODER_GET_CAPABILITIES", |
306 | [_IOC_NR(DECODER_GET_STATUS)] = "DECODER_GET_STATUS", | 306 | [_IOC_NR(DECODER_GET_STATUS)] = "DECODER_GET_STATUS", |
307 | [_IOC_NR(DECODER_SET_NORM)] = "DECODER_SET_NORM", | 307 | [_IOC_NR(DECODER_SET_NORM)] = "DECODER_SET_NORM", |
@@ -367,7 +367,7 @@ void v4l_printk_ioctl(unsigned int cmd) | |||
367 | (_IOC_NR(cmd) < V4L2_INT_IOCTLS) ? | 367 | (_IOC_NR(cmd) < V4L2_INT_IOCTLS) ? |
368 | v4l2_int_ioctls[_IOC_NR(cmd)] : "UNKNOWN", dir, cmd); | 368 | v4l2_int_ioctls[_IOC_NR(cmd)] : "UNKNOWN", dir, cmd); |
369 | break; | 369 | break; |
370 | #ifdef HAVE_V4L1 | 370 | #ifdef CONFIG_V4L1_COMPAT |
371 | case 'v': | 371 | case 'v': |
372 | printk("v4l1 ioctl %s, dir=%s (0x%08x)\n", | 372 | printk("v4l1 ioctl %s, dir=%s (0x%08x)\n", |
373 | (_IOC_NR(cmd) < V4L1_IOCTLS) ? | 373 | (_IOC_NR(cmd) < V4L1_IOCTLS) ? |
@@ -414,6 +414,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) | |||
414 | printk ("%s: tuner type=%d\n", s, *p); | 414 | printk ("%s: tuner type=%d\n", s, *p); |
415 | break; | 415 | break; |
416 | } | 416 | } |
417 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
417 | case DECODER_SET_VBI_BYPASS: | 418 | case DECODER_SET_VBI_BYPASS: |
418 | case DECODER_ENABLE_OUTPUT: | 419 | case DECODER_ENABLE_OUTPUT: |
419 | case DECODER_GET_STATUS: | 420 | case DECODER_GET_STATUS: |
@@ -424,6 +425,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) | |||
424 | case VIDIOCCAPTURE: | 425 | case VIDIOCCAPTURE: |
425 | case VIDIOCSYNC: | 426 | case VIDIOCSYNC: |
426 | case VIDIOCSWRITEMODE: | 427 | case VIDIOCSWRITEMODE: |
428 | #endif | ||
427 | case TUNER_SET_TYPE_ADDR: | 429 | case TUNER_SET_TYPE_ADDR: |
428 | case TUNER_SET_STANDBY: | 430 | case TUNER_SET_STANDBY: |
429 | case TDA9887_SET_CONFIG: | 431 | case TDA9887_SET_CONFIG: |
@@ -755,6 +757,7 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) | |||
755 | p->afc); | 757 | p->afc); |
756 | break; | 758 | break; |
757 | } | 759 | } |
760 | #ifdef CONFIG_VIDEO_V4L1_COMPAT | ||
758 | case VIDIOCGVBIFMT: | 761 | case VIDIOCGVBIFMT: |
759 | case VIDIOCSVBIFMT: | 762 | case VIDIOCSVBIFMT: |
760 | { | 763 | { |
@@ -924,6 +927,14 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) | |||
924 | p->clipcount); | 927 | p->clipcount); |
925 | break; | 928 | break; |
926 | } | 929 | } |
930 | case VIDIOCGFREQ: | ||
931 | case VIDIOCSFREQ: | ||
932 | { | ||
933 | unsigned long *p=arg; | ||
934 | printk ("%s: value=%lu\n", s, *p); | ||
935 | break; | ||
936 | } | ||
937 | #endif | ||
927 | case VIDIOC_INT_AUDIO_CLOCK_FREQ: | 938 | case VIDIOC_INT_AUDIO_CLOCK_FREQ: |
928 | case VIDIOC_INT_I2S_CLOCK_FREQ: | 939 | case VIDIOC_INT_I2S_CLOCK_FREQ: |
929 | case VIDIOC_INT_S_STANDBY: | 940 | case VIDIOC_INT_S_STANDBY: |
@@ -933,13 +944,6 @@ void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg) | |||
933 | printk ("%s: value=%d\n", s, *p); | 944 | printk ("%s: value=%d\n", s, *p); |
934 | break; | 945 | break; |
935 | } | 946 | } |
936 | case VIDIOCGFREQ: | ||
937 | case VIDIOCSFREQ: | ||
938 | { | ||
939 | unsigned long *p=arg; | ||
940 | printk ("%s: value=%lu\n", s, *p); | ||
941 | break; | ||
942 | } | ||
943 | case VIDIOC_G_STD: | 947 | case VIDIOC_G_STD: |
944 | case VIDIOC_S_STD: | 948 | case VIDIOC_S_STD: |
945 | case VIDIOC_QUERYSTD: | 949 | case VIDIOC_QUERYSTD: |
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c index 4c3f92605a82..5c5281981231 100644 --- a/drivers/media/video/videodev.c +++ b/drivers/media/video/videodev.c | |||
@@ -760,7 +760,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, | |||
760 | ret=vfd->vidioc_overlay(file, fh, *i); | 760 | ret=vfd->vidioc_overlay(file, fh, *i); |
761 | break; | 761 | break; |
762 | } | 762 | } |
763 | #ifdef HAVE_V4L1 | 763 | #ifdef CONFIG_V4L1_COMPAT |
764 | /* --- streaming capture ------------------------------------- */ | 764 | /* --- streaming capture ------------------------------------- */ |
765 | case VIDIOCGMBUF: | 765 | case VIDIOCGMBUF: |
766 | { | 766 | { |
@@ -1578,7 +1578,11 @@ int video_register_device(struct video_device *vfd, int type, int nr) | |||
1578 | __FUNCTION__); | 1578 | __FUNCTION__); |
1579 | return ret; | 1579 | return ret; |
1580 | } | 1580 | } |
1581 | video_device_create_file(vfd, &class_device_attr_name); | 1581 | ret = class_device_create_file(&vfd->class_dev, &class_device_attr_name); |
1582 | if (ret < 0) { | ||
1583 | printk(KERN_WARNING "%s error: %d\n", __FUNCTION__, ret); | ||
1584 | return ret; | ||
1585 | } | ||
1582 | 1586 | ||
1583 | #if 1 | 1587 | #if 1 |
1584 | /* needed until all drivers are fixed */ | 1588 | /* needed until all drivers are fixed */ |
diff --git a/drivers/media/video/vivi.c b/drivers/media/video/vivi.c index 41d23c8acbd8..38bd0c1018c2 100644 --- a/drivers/media/video/vivi.c +++ b/drivers/media/video/vivi.c | |||
@@ -986,7 +986,7 @@ static int vidioc_dqbuf (struct file *file, void *priv, struct v4l2_buffer *p) | |||
986 | file->f_flags & O_NONBLOCK)); | 986 | file->f_flags & O_NONBLOCK)); |
987 | } | 987 | } |
988 | 988 | ||
989 | #ifdef HAVE_V4L1 | 989 | #ifdef CONFIG_V4L1_COMPAT |
990 | static int vidiocgmbuf (struct file *file, void *priv, struct video_mbuf *mbuf) | 990 | static int vidiocgmbuf (struct file *file, void *priv, struct video_mbuf *mbuf) |
991 | { | 991 | { |
992 | struct vivi_fh *fh=priv; | 992 | struct vivi_fh *fh=priv; |
@@ -1328,7 +1328,7 @@ static struct video_device vivi = { | |||
1328 | .vidioc_s_ctrl = vidioc_s_ctrl, | 1328 | .vidioc_s_ctrl = vidioc_s_ctrl, |
1329 | .vidioc_streamon = vidioc_streamon, | 1329 | .vidioc_streamon = vidioc_streamon, |
1330 | .vidioc_streamoff = vidioc_streamoff, | 1330 | .vidioc_streamoff = vidioc_streamoff, |
1331 | #ifdef HAVE_V4L1 | 1331 | #ifdef CONFIG_V4L1_COMPAT |
1332 | .vidiocgmbuf = vidiocgmbuf, | 1332 | .vidiocgmbuf = vidiocgmbuf, |
1333 | #endif | 1333 | #endif |
1334 | .tvnorms = tvnorms, | 1334 | .tvnorms = tvnorms, |