diff options
Diffstat (limited to 'linux/drivers/media/video')
38 files changed, 14 insertions, 307 deletions
diff --git a/linux/drivers/media/video/Kconfig b/linux/drivers/media/video/Kconfig index 2e571eb93..8ceccd9ae 100644 --- a/linux/drivers/media/video/Kconfig +++ b/linux/drivers/media/video/Kconfig @@ -516,7 +516,7 @@ config VIDEO_VINO config VIDEO_STRADIS tristate "Stradis 4:2:2 MPEG-2 video driver (EXPERIMENTAL)" - depends on EXPERIMENTAL && PCI && VIDEO_V4L1 && VIRT_TO_BUS + depends on EXPERIMENTAL && PCI && VIDEO_V4L1 help Say Y here to enable support for the Stradis 4:2:2 MPEG-2 video driver for PCI. There is a product page at @@ -527,7 +527,7 @@ config VIDEO_ZORAN_ZR36060 config VIDEO_ZORAN tristate "Zoran ZR36057/36067 Video For Linux" - depends on PCI && I2C_ALGOBIT && VIDEO_V4L1 && VIRT_TO_BUS + depends on PCI && I2C_ALGOBIT && VIDEO_V4L1 help Say Y for support for MJPEG capture cards based on the Zoran 36057/36067 PCI controller chipset. This includes the Iomega diff --git a/linux/drivers/media/video/arv.c b/linux/drivers/media/video/arv.c index e5260f659..0f578259e 100644 --- a/linux/drivers/media/video/arv.c +++ b/linux/drivers/media/video/arv.c @@ -760,7 +760,6 @@ static struct video_device ar_template = { .owner = THIS_MODULE, .name = "Colour AR VGA", .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_ARV, .fops = &ar_fops, .release = ar_release, .minor = -1, diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 4cc02c8e1..d573ae72c 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -3920,7 +3920,6 @@ static struct video_device bttv_video_template = .name = "UNSET", .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER| VID_TYPE_CLIPPING|VID_TYPE_SCALES, - .hardware = VID_HARDWARE_BT848, .fops = &bttv_fops, .minor = -1, }; @@ -3929,7 +3928,6 @@ static struct video_device bttv_vbi_template = { .name = "bt848/878 vbi", .type = VID_TYPE_TUNER|VID_TYPE_TELETEXT, - .hardware = VID_HARDWARE_BT848, .fops = &bttv_fops, .minor = -1, }; @@ -4077,7 +4075,6 @@ static struct video_device radio_template = { .name = "bt848/878 radio", .type = VID_TYPE_TUNER, - .hardware = VID_HARDWARE_BT848, .fops = &radio_fops, .minor = -1, }; diff --git a/linux/drivers/media/video/bw-qcam.c b/linux/drivers/media/video/bw-qcam.c index cb272ecd8..42df7701a 100644 --- a/linux/drivers/media/video/bw-qcam.c +++ b/linux/drivers/media/video/bw-qcam.c @@ -902,7 +902,6 @@ static struct video_device qcam_template= .owner = THIS_MODULE, .name = "Connectix Quickcam", .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_QCAM_BW, .fops = &qcam_fops, }; diff --git a/linux/drivers/media/video/c-qcam.c b/linux/drivers/media/video/c-qcam.c index 609cd084d..933284200 100644 --- a/linux/drivers/media/video/c-qcam.c +++ b/linux/drivers/media/video/c-qcam.c @@ -706,7 +706,6 @@ static struct video_device qcam_template= .owner = THIS_MODULE, .name = "Colour QuickCam", .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_QCAM_C, .fops = &qcam_fops, }; diff --git a/linux/drivers/media/video/cpia.c b/linux/drivers/media/video/cpia.c index 4f6e8f12e..9f0966ce2 100644 --- a/linux/drivers/media/video/cpia.c +++ b/linux/drivers/media/video/cpia.c @@ -67,10 +67,6 @@ MODULE_PARM_DESC(colorspace_conv, #define ABOUT "V4L-Driver for Vision CPiA based cameras" -#ifndef VID_HARDWARE_CPIA -#define VID_HARDWARE_CPIA 24 /* FIXME -> from linux/videodev.h */ -#endif - #define CPIA_MODULE_CPIA (0<<5) #define CPIA_MODULE_SYSTEM (1<<5) #define CPIA_MODULE_VP_CTRL (5<<5) @@ -3806,7 +3802,6 @@ static struct video_device cpia_template = { .owner = THIS_MODULE, .name = "CPiA Camera", .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_CPIA, .fops = &cpia_fops, }; diff --git a/linux/drivers/media/video/cpia2/cpia2_v4l.c b/linux/drivers/media/video/cpia2/cpia2_v4l.c index e3aaba1e0..e378abec8 100644 --- a/linux/drivers/media/video/cpia2/cpia2_v4l.c +++ b/linux/drivers/media/video/cpia2/cpia2_v4l.c @@ -86,10 +86,6 @@ MODULE_LICENSE("GPL"); #define ABOUT "V4L-Driver for Vision CPiA2 based cameras" -#ifndef VID_HARDWARE_CPIA2 -#error "VID_HARDWARE_CPIA2 should have been defined in linux/videodev.h" -#endif - struct control_menu_info { int value; char name[32]; @@ -1942,7 +1938,6 @@ static struct video_device cpia2_template = { .type= VID_TYPE_CAPTURE, .type2 = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING, - .hardware= VID_HARDWARE_CPIA2, .minor= -1, .fops= &fops_template, .release= video_device_release, diff --git a/linux/drivers/media/video/cx23885/cx23885-core.c b/linux/drivers/media/video/cx23885/cx23885-core.c index 03ed18894..1ffc9695e 100644 --- a/linux/drivers/media/video/cx23885/cx23885-core.c +++ b/linux/drivers/media/video/cx23885/cx23885-core.c @@ -794,7 +794,7 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) dev->pci->subsystem_device); cx23885_devcount--; - goto fail_free; + return -ENODEV; } /* PCIe stuff */ @@ -836,10 +836,6 @@ static int cx23885_dev_setup(struct cx23885_dev *dev) } return 0; - -fail_free: - kfree(dev); - return -ENODEV; } void cx23885_dev_unregister(struct cx23885_dev *dev) diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c index 7c483f691..1d729dbde 100644 --- a/linux/drivers/media/video/cx88/cx88-blackbird.c +++ b/linux/drivers/media/video/cx88/cx88-blackbird.c @@ -537,44 +537,6 @@ static void blackbird_codec_settings(struct cx8802_dev *dev) cx2341x_update(dev, blackbird_mbox_func, NULL, &dev->params); } -static struct v4l2_mpeg_compression default_mpeg_params = { - .st_type = V4L2_MPEG_PS_2, - .st_bitrate = { - .mode = V4L2_BITRATE_CBR, - .min = 0, - .target = 0, - .max = 0 - }, - .ts_pid_pmt = 16, - .ts_pid_audio = 260, - .ts_pid_video = 256, - .ts_pid_pcr = 259, - .ps_size = 0, - .au_type = V4L2_MPEG_AU_2_II, - .au_bitrate = { - .mode = V4L2_BITRATE_CBR, - .min = 224, - .target = 224, - .max = 224 - }, - .au_sample_rate = 48000, - .au_pesid = 0, - .vi_type = V4L2_MPEG_VI_2, - .vi_aspect_ratio = V4L2_MPEG_ASPECT_4_3, - .vi_bitrate = { - .mode = V4L2_BITRATE_CBR, - .min = 4000, - .target = 4500, - .max = 6000 - }, - .vi_frame_rate = 25, - .vi_frames_per_gop = 12, - .vi_bframes_count = 2, - .vi_pesid = 0, - .closed_gops = 1, - .pulldown = 0 -}; - static int blackbird_initialize_codec(struct cx8802_dev *dev) { struct cx88_core *core = dev->core; @@ -878,23 +840,6 @@ static int vidioc_streamoff(struct file *file, void *priv, enum v4l2_buf_type i) return videobuf_streamoff(&fh->mpegq); } -static int vidioc_g_mpegcomp (struct file *file, void *fh, - struct v4l2_mpeg_compression *f) -{ - printk(KERN_WARNING "VIDIOC_G_MPEGCOMP is obsolete. " - "Replace with VIDIOC_G_EXT_CTRLS!"); - memcpy(f,&default_mpeg_params,sizeof(*f)); - return 0; -} - -static int vidioc_s_mpegcomp (struct file *file, void *fh, - struct v4l2_mpeg_compression *f) -{ - printk(KERN_WARNING "VIDIOC_S_MPEGCOMP is obsolete. " - "Replace with VIDIOC_S_EXT_CTRLS!"); - return 0; -} - static int vidioc_g_ext_ctrls (struct file *file, void *priv, struct v4l2_ext_controls *f) { @@ -1242,8 +1187,6 @@ static struct video_device cx8802_mpeg_template = .vidioc_dqbuf = vidioc_dqbuf, .vidioc_streamon = vidioc_streamon, .vidioc_streamoff = vidioc_streamoff, - .vidioc_g_mpegcomp = vidioc_g_mpegcomp, - .vidioc_s_mpegcomp = vidioc_s_mpegcomp, .vidioc_g_ext_ctrls = vidioc_g_ext_ctrls, .vidioc_s_ext_ctrls = vidioc_s_ext_ctrls, .vidioc_try_ext_ctrls = vidioc_try_ext_ctrls, diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 46509d24b..dbbcb212f 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1964,7 +1964,6 @@ static struct video_device cx8800_radio_template = { .name = "cx8800-radio", .type = VID_TYPE_TUNER, - .hardware = 0, .fops = &radio_fops, .minor = -1, .vidioc_querycap = radio_querycap, diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index 94a0a4e9b..45bbefeff 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -1714,7 +1714,6 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, /* Fills VBI device info */ dev->vbi_dev->type = VFL_TYPE_VBI; - dev->vbi_dev->hardware = 0; dev->vbi_dev->fops = &em28xx_v4l_fops; dev->vbi_dev->minor = -1; dev->vbi_dev->dev = &dev->udev->dev; @@ -1726,7 +1725,6 @@ static int em28xx_init_dev(struct em28xx **devhandle, struct usb_device *udev, dev->vdev->type = VID_TYPE_CAPTURE; if (dev->has_tuner) dev->vdev->type |= VID_TYPE_TUNER; - dev->vdev->hardware = 0; dev->vdev->fops = &em28xx_v4l_fops; #if 0 dev->vdev->f_op=&em28xx_v4l_fops; diff --git a/linux/drivers/media/video/et61x251/et61x251_core.c b/linux/drivers/media/video/et61x251/et61x251_core.c index 009deaa89..154de3424 100644 --- a/linux/drivers/media/video/et61x251/et61x251_core.c +++ b/linux/drivers/media/video/et61x251/et61x251_core.c @@ -2589,7 +2589,6 @@ et61x251_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) strcpy(cam->v4ldev->name, "ET61X[12]51 PC Camera"); cam->v4ldev->owner = THIS_MODULE; cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES; - cam->v4ldev->hardware = 0; cam->v4ldev->fops = &et61x251_fops; cam->v4ldev->minor = video_nr[dev_nr]; cam->v4ldev->release = video_device_release; diff --git a/linux/drivers/media/video/meye.c b/linux/drivers/media/video/meye.c index 035000a14..502d5cdfe 100644 --- a/linux/drivers/media/video/meye.c +++ b/linux/drivers/media/video/meye.c @@ -1767,7 +1767,6 @@ static struct video_device meye_template = { .owner = THIS_MODULE, .name = "meye", .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_MEYE, .fops = &meye_fops, .release = video_device_release, .minor = -1, diff --git a/linux/drivers/media/video/ov511.c b/linux/drivers/media/video/ov511.c index f160806ff..406ffe0c6 100644 --- a/linux/drivers/media/video/ov511.c +++ b/linux/drivers/media/video/ov511.c @@ -4672,7 +4672,6 @@ static struct video_device vdev_template = { .owner = THIS_MODULE, .name = "OV511 USB Camera", .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_OV511, .fops = &ov511_fops, .release = video_device_release, .minor = -1, diff --git a/linux/drivers/media/video/planb.c b/linux/drivers/media/video/planb.c index 0a2c3d135..5da38b139 100644 --- a/linux/drivers/media/video/planb.c +++ b/linux/drivers/media/video/planb.c @@ -2022,7 +2022,6 @@ static struct video_device planb_template= .owner = THIS_MODULE, .name = PLANB_DEVICE_NAME, .type = VID_TYPE_OVERLAY, - .hardware = VID_HARDWARE_PLANB, .open = planb_open, .close = planb_close, .read = planb_read, diff --git a/linux/drivers/media/video/pms.c b/linux/drivers/media/video/pms.c index 8d4b18199..ce69c0399 100644 --- a/linux/drivers/media/video/pms.c +++ b/linux/drivers/media/video/pms.c @@ -902,7 +902,6 @@ static struct video_device pms_template= .owner = THIS_MODULE, .name = "Mediavision PMS", .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_PMS, .fops = &pms_fops, }; diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c index a8a8a36ee..b192db67e 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c @@ -1122,15 +1122,12 @@ static const struct file_operations vdev_fops = { }; -#define VID_HARDWARE_PVRUSB2 38 /* FIXME : need a good value */ - static struct video_device vdev_template = { .owner = THIS_MODULE, .type = VID_TYPE_CAPTURE | VID_TYPE_TUNER, .type2 = (V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VBI_CAPTURE | V4L2_CAP_TUNER | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE), - .hardware = VID_HARDWARE_PVRUSB2, .fops = &vdev_fops, }; diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c index 3c80b9189..de0ae93e3 100644 --- a/linux/drivers/media/video/pwc/pwc-if.c +++ b/linux/drivers/media/video/pwc/pwc-if.c @@ -166,7 +166,6 @@ static struct video_device pwc_template = { .owner = THIS_MODULE, .name = "Philips Webcam", /* Filled in later */ .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_PWC, .release = video_device_release, .fops = &pwc_fops, .minor = -1, diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c index 6a94c742d..1ea15594d 100644 --- a/linux/drivers/media/video/saa7134/saa6752hs.c +++ b/linux/drivers/media/video/saa7134/saa6752hs.c @@ -78,7 +78,6 @@ static const struct v4l2_format v4l2_format_table[] = struct saa6752hs_state { struct i2c_client client; - struct v4l2_mpeg_compression old_params; struct saa6752hs_mpeg_params params; enum saa6752hs_videoformat video_format; v4l2_std_id standard; @@ -168,39 +167,6 @@ static struct saa6752hs_mpeg_params param_defaults = .au_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_256K, }; -static struct v4l2_mpeg_compression old_param_defaults = -{ - .st_type = V4L2_MPEG_TS_2, - .st_bitrate = { - .mode = V4L2_BITRATE_CBR, - .target = 7000, - }, - - .ts_pid_pmt = 16, - .ts_pid_video = 260, - .ts_pid_audio = 256, - .ts_pid_pcr = 259, - - .vi_type = V4L2_MPEG_VI_2, - .vi_aspect_ratio = V4L2_MPEG_ASPECT_4_3, - .vi_bitrate = { - .mode = V4L2_BITRATE_VBR, - .target = 4000, - .max = 6000, - }, - - .au_type = V4L2_MPEG_AU_2_II, - .au_bitrate = { - .mode = V4L2_BITRATE_CBR, - .target = 256, - }, - -#if 0 - /* FIXME: size? via S_FMT? */ - .video_format = MPEG_VIDEO_FORMAT_D1, -#endif -}; - /* ---------------------------------------------------------------------- */ static int saa6752hs_chip_command(struct i2c_client* client, @@ -373,74 +339,6 @@ static void saa6752hs_set_subsampling(struct i2c_client* client, } -static void saa6752hs_old_set_params(struct i2c_client* client, - struct v4l2_mpeg_compression* params) -{ - struct saa6752hs_state *h = i2c_get_clientdata(client); - - /* check PIDs */ - if (params->ts_pid_pmt <= MPEG_PID_MAX) { - h->old_params.ts_pid_pmt = params->ts_pid_pmt; - h->params.ts_pid_pmt = params->ts_pid_pmt; - } - if (params->ts_pid_pcr <= MPEG_PID_MAX) { - h->old_params.ts_pid_pcr = params->ts_pid_pcr; - h->params.ts_pid_pcr = params->ts_pid_pcr; - } - if (params->ts_pid_video <= MPEG_PID_MAX) { - h->old_params.ts_pid_video = params->ts_pid_video; - h->params.ts_pid_video = params->ts_pid_video; - } - if (params->ts_pid_audio <= MPEG_PID_MAX) { - h->old_params.ts_pid_audio = params->ts_pid_audio; - h->params.ts_pid_audio = params->ts_pid_audio; - } - - /* check bitrate parameters */ - if ((params->vi_bitrate.mode == V4L2_BITRATE_CBR) || - (params->vi_bitrate.mode == V4L2_BITRATE_VBR)) { - h->old_params.vi_bitrate.mode = params->vi_bitrate.mode; - h->params.vi_bitrate_mode = (params->vi_bitrate.mode == V4L2_BITRATE_VBR) ? - V4L2_MPEG_VIDEO_BITRATE_MODE_VBR : V4L2_MPEG_VIDEO_BITRATE_MODE_CBR; - } - if (params->vi_bitrate.mode != V4L2_BITRATE_NONE) - h->old_params.st_bitrate.target = params->st_bitrate.target; - if (params->vi_bitrate.mode != V4L2_BITRATE_NONE) - h->old_params.vi_bitrate.target = params->vi_bitrate.target; - if (params->vi_bitrate.mode == V4L2_BITRATE_VBR) - h->old_params.vi_bitrate.max = params->vi_bitrate.max; - if (params->au_bitrate.mode != V4L2_BITRATE_NONE) - h->old_params.au_bitrate.target = params->au_bitrate.target; - - /* aspect ratio */ - if (params->vi_aspect_ratio == V4L2_MPEG_ASPECT_4_3 || - params->vi_aspect_ratio == V4L2_MPEG_ASPECT_16_9) { - h->old_params.vi_aspect_ratio = params->vi_aspect_ratio; - if (params->vi_aspect_ratio == V4L2_MPEG_ASPECT_4_3) - h->params.vi_aspect = V4L2_MPEG_VIDEO_ASPECT_4x3; - else - h->params.vi_aspect = V4L2_MPEG_VIDEO_ASPECT_16x9; - } - - /* range checks */ - if (h->old_params.st_bitrate.target > MPEG_TOTAL_TARGET_BITRATE_MAX) - h->old_params.st_bitrate.target = MPEG_TOTAL_TARGET_BITRATE_MAX; - if (h->old_params.vi_bitrate.target > MPEG_VIDEO_TARGET_BITRATE_MAX) - h->old_params.vi_bitrate.target = MPEG_VIDEO_TARGET_BITRATE_MAX; - if (h->old_params.vi_bitrate.max > MPEG_VIDEO_MAX_BITRATE_MAX) - h->old_params.vi_bitrate.max = MPEG_VIDEO_MAX_BITRATE_MAX; - h->params.vi_bitrate = params->vi_bitrate.target; - h->params.vi_bitrate_peak = params->vi_bitrate.max; - if (h->old_params.au_bitrate.target <= 256) { - h->old_params.au_bitrate.target = 256; - h->params.au_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_256K; - } - else { - h->old_params.au_bitrate.target = 384; - h->params.au_l2_bitrate = V4L2_MPEG_AUDIO_L2_BITRATE_384K; - } -} - static int handle_ctrl(struct saa6752hs_mpeg_params *params, struct v4l2_ext_control *ctrl, unsigned int cmd) { @@ -712,7 +610,6 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, unsigned short f return -ENOMEM; h->client = client_template; h->params = param_defaults; - h->old_params = old_param_defaults; h->client.adapter = adap; h->client.addr = addr; @@ -756,23 +653,11 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg) { struct saa6752hs_state *h = i2c_get_clientdata(client); struct v4l2_ext_controls *ctrls = arg; - struct v4l2_mpeg_compression *old_params = arg; struct saa6752hs_mpeg_params params; int err = 0; int i; switch (cmd) { - case VIDIOC_S_MPEGCOMP: - if (NULL == old_params) { - /* apply settings and start encoder */ - saa6752hs_init(client); - break; - } - saa6752hs_old_set_params(client, old_params); - /* fall through */ - case VIDIOC_G_MPEGCOMP: - *old_params = h->old_params; - break; case VIDIOC_S_EXT_CTRLS: if (ctrls->ctrl_class != V4L2_CTRL_CLASS_MPEG) return -EINVAL; diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c index 4aa8fb853..9cf861614 100644 --- a/linux/drivers/media/video/saa7134/saa7134-empress.c +++ b/linux/drivers/media/video/saa7134/saa7134-empress.c @@ -293,17 +293,6 @@ static int ts_do_ioctl(struct inode *inode, struct file *file, case VIDIOC_S_CTRL: return saa7134_common_ioctl(dev, cmd, arg); - case VIDIOC_S_MPEGCOMP: - printk(KERN_WARNING "VIDIOC_S_MPEGCOMP is obsolete. " - "Replace with VIDIOC_S_EXT_CTRLS!"); - saa7134_i2c_call_clients(dev, VIDIOC_S_MPEGCOMP, arg); - ts_init_encoder(dev); - return 0; - case VIDIOC_G_MPEGCOMP: - printk(KERN_WARNING "VIDIOC_G_MPEGCOMP is obsolete. " - "Replace with VIDIOC_G_EXT_CTRLS!"); - saa7134_i2c_call_clients(dev, VIDIOC_G_MPEGCOMP, arg); - return 0; case VIDIOC_S_EXT_CTRLS: /* count == 0 is abused in saa6752hs.c, so that special case is handled here explicitly. */ @@ -351,7 +340,6 @@ static struct video_device saa7134_empress_template = .name = "saa7134-empress", .type = 0 /* FIXME */, .type2 = 0 /* FIXME */, - .hardware = 0, .fops = &ts_fops, .minor = -1, }; diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c index ebf70e965..7834a8cb5 100644 --- a/linux/drivers/media/video/saa7134/saa7134-video.c +++ b/linux/drivers/media/video/saa7134/saa7134-video.c @@ -2363,7 +2363,6 @@ struct video_device saa7134_video_template = .name = "saa7134-video", .type = VID_TYPE_CAPTURE|VID_TYPE_TUNER| VID_TYPE_CLIPPING|VID_TYPE_SCALES, - .hardware = 0, .fops = &video_fops, .minor = -1, }; @@ -2372,7 +2371,6 @@ struct video_device saa7134_vbi_template = { .name = "saa7134-vbi", .type = VID_TYPE_TUNER|VID_TYPE_TELETEXT, - .hardware = 0, .fops = &video_fops, .minor = -1, }; @@ -2381,7 +2379,6 @@ struct video_device saa7134_radio_template = { .name = "saa7134-radio", .type = VID_TYPE_TUNER, - .hardware = 0, .fops = &radio_fops, .minor = -1, }; diff --git a/linux/drivers/media/video/se401.c b/linux/drivers/media/video/se401.c index bf8a6d560..056337372 100644 --- a/linux/drivers/media/video/se401.c +++ b/linux/drivers/media/video/se401.c @@ -1239,7 +1239,6 @@ static struct video_device se401_template = { .owner = THIS_MODULE, .name = "se401 USB camera", .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_SE401, .fops = &se401_fops, }; diff --git a/linux/drivers/media/video/sn9c102/sn9c102_core.c b/linux/drivers/media/video/sn9c102/sn9c102_core.c index 482f5f910..a8f0a411a 100644 --- a/linux/drivers/media/video/sn9c102/sn9c102_core.c +++ b/linux/drivers/media/video/sn9c102/sn9c102_core.c @@ -3323,7 +3323,6 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) strcpy(cam->v4ldev->name, "SN9C1xx PC Camera"); cam->v4ldev->owner = THIS_MODULE; cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES; - cam->v4ldev->hardware = 0; cam->v4ldev->fops = &sn9c102_fops; cam->v4ldev->minor = video_nr[dev_nr]; cam->v4ldev->release = video_device_release; diff --git a/linux/drivers/media/video/stradis.c b/linux/drivers/media/video/stradis.c index 6efcaeac0..f5de75513 100644 --- a/linux/drivers/media/video/stradis.c +++ b/linux/drivers/media/video/stradis.c @@ -1922,7 +1922,6 @@ static const struct file_operations saa_fops = { static struct video_device saa_template = { .name = "SAA7146A", .type = VID_TYPE_CAPTURE | VID_TYPE_OVERLAY, - .hardware = VID_HARDWARE_SAA7146, .fops = &saa_fops, .minor = -1, }; diff --git a/linux/drivers/media/video/stv680.c b/linux/drivers/media/video/stv680.c index d015cbe9c..ee11c70fa 100644 --- a/linux/drivers/media/video/stv680.c +++ b/linux/drivers/media/video/stv680.c @@ -1405,7 +1405,6 @@ static struct video_device stv680_template = { .owner = THIS_MODULE, .name = "STV0680 USB camera", .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_SE401, .fops = &stv680_fops, .release = video_device_release, .minor = -1, diff --git a/linux/drivers/media/video/usbvideo/usbvideo.c b/linux/drivers/media/video/usbvideo/usbvideo.c index e4981f41c..484628734 100644 --- a/linux/drivers/media/video/usbvideo/usbvideo.c +++ b/linux/drivers/media/video/usbvideo/usbvideo.c @@ -952,7 +952,6 @@ static const struct file_operations usbvideo_fops = { static const struct video_device usbvideo_template = { .owner = THIS_MODULE, .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_CPIA, .fops = &usbvideo_fops, }; diff --git a/linux/drivers/media/video/usbvideo/vicam.c b/linux/drivers/media/video/usbvideo/vicam.c index 679ef6771..c1dc9a40c 100644 --- a/linux/drivers/media/video/usbvideo/vicam.c +++ b/linux/drivers/media/video/usbvideo/vicam.c @@ -1080,7 +1080,6 @@ static struct video_device vicam_template = { .owner = THIS_MODULE, .name = "ViCam-based USB Camera", .type = VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_VICAM, .fops = &vicam_fops, .minor = -1, }; diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c index 7b8d1a06e..37cacff34 100644 --- a/linux/drivers/media/video/usbvision/usbvision-video.c +++ b/linux/drivers/media/video/usbvision/usbvision-video.c @@ -1464,7 +1464,6 @@ static int usbvision_vbi_ioctl(struct inode *inode, struct file *file, #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) static struct video_device usbvision_video_template = { .type = VID_TYPE_TUNER | VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_USBVISION, .open = usbvision_v4l2_open, .close = usbvision_v4l2_close, .read = usbvision_v4l2_read, @@ -1493,7 +1492,6 @@ static struct video_device usbvision_video_template = { .owner = THIS_MODULE, #endif .type = VID_TYPE_TUNER | VID_TYPE_CAPTURE, - .hardware = VID_HARDWARE_USBVISION, .fops = &usbvision_fops, #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .name = "usbvision-video", @@ -1542,7 +1540,6 @@ static struct video_device usbvision_video_template = { static struct video_device usbvision_radio_template= { .type = VID_TYPE_TUNER, - .hardware = VID_HARDWARE_USBVISION, .open = usbvision_radio_open, .close = usbvision_radio_close, .ioctl = video_ioctl2, @@ -1568,7 +1565,6 @@ static struct video_device usbvision_radio_template= .owner = THIS_MODULE, #endif .type = VID_TYPE_TUNER, - .hardware = VID_HARDWARE_USBVISION, .fops = &usbvision_radio_fops, #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .name = "usbvision-radio", @@ -1599,7 +1595,6 @@ static struct video_device usbvision_radio_template= static struct video_device usbvision_vbi_template= { type: VID_TYPE_TELETEXT, - hardware: VID_HARDWARE_USBVISION, open: usbvision_vbi_open, close: usbvision_vbi_close, ioctl: usbvision_vbi_ioctl, @@ -1625,7 +1620,6 @@ static struct video_device usbvision_vbi_template= .owner = THIS_MODULE, #endif .type = VID_TYPE_TUNER, - .hardware = VID_HARDWARE_USBVISION, .fops = &usbvision_vbi_fops, #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .release = video_device_release, diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c index d595452a3..49450c919 100644 --- a/linux/drivers/media/video/v4l2-common.c +++ b/linux/drivers/media/video/v4l2-common.c @@ -339,10 +339,6 @@ static const char *v4l2_ioctls[] = { [_IOC_NR(VIDIOC_ENUM_FMT)] = "VIDIOC_ENUM_FMT", [_IOC_NR(VIDIOC_G_FMT)] = "VIDIOC_G_FMT", [_IOC_NR(VIDIOC_S_FMT)] = "VIDIOC_S_FMT", -#if 1 /* experimental*/ - [_IOC_NR(VIDIOC_G_MPEGCOMP)] = "VIDIOC_G_MPEGCOMP", - [_IOC_NR(VIDIOC_S_MPEGCOMP)] = "VIDIOC_S_MPEGCOMP", -#endif [_IOC_NR(VIDIOC_REQBUFS)] = "VIDIOC_REQBUFS", [_IOC_NR(VIDIOC_QUERYBUF)] = "VIDIOC_QUERYBUF", [_IOC_NR(VIDIOC_G_FBUF)] = "VIDIOC_G_FBUF", @@ -756,22 +752,6 @@ void v4l_printk_ioctl_arg(const char *s, unsigned int cmd, const void *arg) p->rangehigh,p->txsubchans); break; } - case VIDIOC_G_MPEGCOMP: - case VIDIOC_S_MPEGCOMP: - { - const struct v4l2_mpeg_compression *p=arg; - /*FIXME: Several fields not shown */ - printk ("%s: ts_pid_pmt=%d, ts_pid_audio=%d, ts_pid_video=%d, " - "ts_pid_pcr=%d, ps_size=%d, au_sample_rate=%d, " - "au_pesid=%c, vi_frame_rate=%d, vi_frames_per_gop=%d, " - "vi_bframes_count=%d, vi_pesid=%c\n", s, - p->ts_pid_pmt,p->ts_pid_audio, p->ts_pid_video, - p->ts_pid_pcr, p->ps_size, p->au_sample_rate, - p->au_pesid, p->vi_frame_rate, - p->vi_frames_per_gop, p->vi_bframes_count, - p->vi_pesid); - break; - } case VIDIOC_ENUMOUTPUT: { const struct v4l2_output *p=arg; diff --git a/linux/drivers/media/video/videobuf-core.c b/linux/drivers/media/video/videobuf-core.c index e1ca1d78c..0085b9de7 100644 --- a/linux/drivers/media/video/videobuf-core.c +++ b/linux/drivers/media/video/videobuf-core.c @@ -968,6 +968,7 @@ int videobuf_cgmbuf(struct videobuf_queue *q, return 0; } +EXPORT_SYMBOL_GPL(videobuf_cgmbuf); #endif /* --------------------------------------------------------------------- */ @@ -986,7 +987,6 @@ EXPORT_SYMBOL_GPL(videobuf_reqbufs); EXPORT_SYMBOL_GPL(videobuf_querybuf); EXPORT_SYMBOL_GPL(videobuf_qbuf); EXPORT_SYMBOL_GPL(videobuf_dqbuf); -EXPORT_SYMBOL_GPL(videobuf_cgmbuf); EXPORT_SYMBOL_GPL(videobuf_streamon); EXPORT_SYMBOL_GPL(videobuf_streamoff); diff --git a/linux/drivers/media/video/videocodec.c b/linux/drivers/media/video/videocodec.c index f2bbd7a4d..87951ec82 100644 --- a/linux/drivers/media/video/videocodec.c +++ b/linux/drivers/media/video/videocodec.c @@ -86,8 +86,8 @@ videocodec_attach (struct videocodec_master *master) } dprintk(2, - "videocodec_attach: '%s', type: %x, flags %lx, magic %lx\n", - master->name, master->type, master->flags, master->magic); + "videocodec_attach: '%s', flags %lx, magic %lx\n", + master->name, master->flags, master->magic); if (!h) { dprintk(1, diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index 0fd807e07..c3858dc82 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -1350,48 +1350,6 @@ static int __video_do_ioctl(struct inode *inode, struct file *file, ret=vfd->vidioc_cropcap(file, fh, p); break; } - case VIDIOC_G_MPEGCOMP: - { - struct v4l2_mpeg_compression *p=arg; - - /*FIXME: Several fields not shown */ - if (!vfd->vidioc_g_mpegcomp) - break; - ret=vfd->vidioc_g_mpegcomp(file, fh, p); - if (!ret) - dbgarg (cmd, "ts_pid_pmt=%d, ts_pid_audio=%d," - " ts_pid_video=%d, ts_pid_pcr=%d, " - "ps_size=%d, au_sample_rate=%d, " - "au_pesid=%c, vi_frame_rate=%d, " - "vi_frames_per_gop=%d, " - "vi_bframes_count=%d, vi_pesid=%c\n", - p->ts_pid_pmt,p->ts_pid_audio, - p->ts_pid_video,p->ts_pid_pcr, - p->ps_size, p->au_sample_rate, - p->au_pesid, p->vi_frame_rate, - p->vi_frames_per_gop, - p->vi_bframes_count, p->vi_pesid); - break; - } - case VIDIOC_S_MPEGCOMP: - { - struct v4l2_mpeg_compression *p=arg; - /*FIXME: Several fields not shown */ - if (!vfd->vidioc_s_mpegcomp) - break; - dbgarg (cmd, "ts_pid_pmt=%d, ts_pid_audio=%d, " - "ts_pid_video=%d, ts_pid_pcr=%d, ps_size=%d, " - "au_sample_rate=%d, au_pesid=%c, " - "vi_frame_rate=%d, vi_frames_per_gop=%d, " - "vi_bframes_count=%d, vi_pesid=%c\n", - p->ts_pid_pmt,p->ts_pid_audio, p->ts_pid_video, - p->ts_pid_pcr, p->ps_size, p->au_sample_rate, - p->au_pesid, p->vi_frame_rate, - p->vi_frames_per_gop, p->vi_bframes_count, - p->vi_pesid); - ret=vfd->vidioc_s_mpegcomp(file, fh, p); - break; - } case VIDIOC_G_JPEGCOMP: { struct v4l2_jpegcompression *p=arg; diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c index 5d1c8ff29..72ddc8353 100644 --- a/linux/drivers/media/video/vivi.c +++ b/linux/drivers/media/video/vivi.c @@ -1217,7 +1217,6 @@ static const struct file_operations vivi_fops = { static struct video_device vivi = { .name = "vivi", .type = VID_TYPE_CAPTURE, - .hardware = 0, .fops = &vivi_fops, .minor = -1, // .release = video_device_release, diff --git a/linux/drivers/media/video/w9966.c b/linux/drivers/media/video/w9966.c index 7b8cbe010..bad59720a 100644 --- a/linux/drivers/media/video/w9966.c +++ b/linux/drivers/media/video/w9966.c @@ -197,7 +197,6 @@ static struct video_device w9966_template = { .owner = THIS_MODULE, .name = W9966_DRIVERNAME, .type = VID_TYPE_CAPTURE | VID_TYPE_SCALES, - .hardware = VID_HARDWARE_W9966, .fops = &w9966_fops, }; diff --git a/linux/drivers/media/video/w9968cf.c b/linux/drivers/media/video/w9968cf.c index 96247da94..c1c07c0c0 100644 --- a/linux/drivers/media/video/w9968cf.c +++ b/linux/drivers/media/video/w9968cf.c @@ -3568,7 +3568,6 @@ w9968cf_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) strcpy(cam->v4ldev->name, symbolic(camlist, mod_id)); cam->v4ldev->owner = THIS_MODULE; cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES; - cam->v4ldev->hardware = VID_HARDWARE_W9968CF; cam->v4ldev->fops = &w9968cf_fops; cam->v4ldev->minor = video_nr[dev_nr]; cam->v4ldev->release = video_device_release; diff --git a/linux/drivers/media/video/zc0301/zc0301_core.c b/linux/drivers/media/video/zc0301/zc0301_core.c index de6c86be0..e0c206c7c 100644 --- a/linux/drivers/media/video/zc0301/zc0301_core.c +++ b/linux/drivers/media/video/zc0301/zc0301_core.c @@ -1989,7 +1989,6 @@ zc0301_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) strcpy(cam->v4ldev->name, "ZC0301[P] PC Camera"); cam->v4ldev->owner = THIS_MODULE; cam->v4ldev->type = VID_TYPE_CAPTURE | VID_TYPE_SCALES; - cam->v4ldev->hardware = 0; cam->v4ldev->fops = &zc0301_fops; cam->v4ldev->minor = video_nr[dev_nr]; cam->v4ldev->release = video_device_release; diff --git a/linux/drivers/media/video/zoran_card.c b/linux/drivers/media/video/zoran_card.c index ee8dbf0a2..979de640b 100644 --- a/linux/drivers/media/video/zoran_card.c +++ b/linux/drivers/media/video/zoran_card.c @@ -1238,8 +1238,14 @@ zoran_setup_videocodec (struct zoran *zr, return m; } - m->magic = 0L; /* magic not used */ - m->type = VID_HARDWARE_ZR36067; + /* magic and type are unused for master struct. Makes sense only at + codec structs. + In the past, .type were initialized to the old V4L1 .hardware + value, as VID_HARDWARE_ZR36067 + */ + m->magic = 0L; + m->type = 0; + m->flags = CODEC_FLAG_ENCODER | CODEC_FLAG_DECODER; strncpy(m->name, ZR_DEVNAME(zr), sizeof(m->name)); m->data = zr; diff --git a/linux/drivers/media/video/zoran_driver.c b/linux/drivers/media/video/zoran_driver.c index 22df04195..e2e8fa66a 100644 --- a/linux/drivers/media/video/zoran_driver.c +++ b/linux/drivers/media/video/zoran_driver.c @@ -60,7 +60,6 @@ #include <linux/spinlock.h> #define MAP_NR(x) virt_to_page(x) -#define ZORAN_HARDWARE VID_HARDWARE_ZR36067 #define ZORAN_VID_TYPE ( \ VID_TYPE_CAPTURE | \ VID_TYPE_OVERLAY | \ @@ -4726,7 +4725,6 @@ struct video_device zoran_template __devinitdata = { #ifdef CONFIG_VIDEO_V4L2 .type2 = ZORAN_V4L2_VID_FLAGS, #endif - .hardware = ZORAN_HARDWARE, .fops = &zoran_fops, .release = &zoran_vdev_release, .minor = -1 |