Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: media/usb: rename VFL_TYPE_GRABBER to _VIDEO

'GRABBER' is a weird name, all other types map to the /dev
device names. Rename to 'VIDEO' to be consistent with the
other types.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Hans Verkuil and committed by
Mauro Carvalho Chehab
7fbbbc78 e653614e

+29 -29
+2 -2
drivers/media/usb/au0828/au0828-video.c
··· 1042 1042 dev->streaming_users, dev->users); 1043 1043 1044 1044 mutex_lock(&dev->lock); 1045 - if (vdev->vfl_type == VFL_TYPE_GRABBER && dev->vid_timeout_running) { 1045 + if (vdev->vfl_type == VFL_TYPE_VIDEO && dev->vid_timeout_running) { 1046 1046 /* Cancel timeout thread in case they didn't call streamoff */ 1047 1047 dev->vid_timeout_running = 0; 1048 1048 del_timer_sync(&dev->vid_timeout); ··· 2007 2007 2008 2008 /* Register the v4l2 device */ 2009 2009 video_set_drvdata(&dev->vdev, dev); 2010 - retval = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, -1); 2010 + retval = video_register_device(&dev->vdev, VFL_TYPE_VIDEO, -1); 2011 2011 if (retval != 0) { 2012 2012 dprintk(1, "unable to register video device (error = %d).\n", 2013 2013 retval);
+1 -1
drivers/media/usb/cpia2/cpia2_v4l.c
··· 1134 1134 reset_camera_struct_v4l(cam); 1135 1135 1136 1136 /* register v4l device */ 1137 - if (video_register_device(&cam->vdev, VFL_TYPE_GRABBER, video_nr) < 0) { 1137 + if (video_register_device(&cam->vdev, VFL_TYPE_VIDEO, video_nr) < 0) { 1138 1138 ERR("video_register_device failed\n"); 1139 1139 return -ENODEV; 1140 1140 }
+1 -1
drivers/media/usb/cx231xx/cx231xx-417.c
··· 1790 1790 dev->v4l_device.queue = q; 1791 1791 1792 1792 err = video_register_device(&dev->v4l_device, 1793 - VFL_TYPE_GRABBER, -1); 1793 + VFL_TYPE_VIDEO, -1); 1794 1794 if (err < 0) { 1795 1795 dprintk(3, "%s: can't register mpeg device\n", dev->name); 1796 1796 v4l2_ctrl_handler_free(&dev->mpeg_ctrl_handler.hdl);
+1 -1
drivers/media/usb/cx231xx/cx231xx-video.c
··· 1785 1785 dev->vdev.device_caps |= V4L2_CAP_TUNER; 1786 1786 1787 1787 /* register v4l2 video video_device */ 1788 - ret = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, 1788 + ret = video_register_device(&dev->vdev, VFL_TYPE_VIDEO, 1789 1789 video_nr[dev->devno]); 1790 1790 if (ret) { 1791 1791 dev_err(dev->dev,
+6 -6
drivers/media/usb/dvb-usb/cxusb-analog.c
··· 1223 1223 if (tuner->index != 0) 1224 1224 return -EINVAL; 1225 1225 1226 - if (vdev->vfl_type == VFL_TYPE_GRABBER) 1226 + if (vdev->vfl_type == VFL_TYPE_VIDEO) 1227 1227 tuner->type = V4L2_TUNER_ANALOG_TV; 1228 1228 else 1229 1229 tuner->type = V4L2_TUNER_RADIO; ··· 1259 1259 if (ret != 0) 1260 1260 return ret; 1261 1261 1262 - if (vdev->vfl_type == VFL_TYPE_GRABBER) 1262 + if (vdev->vfl_type == VFL_TYPE_VIDEO) 1263 1263 strscpy(tuner->name, "TV tuner", sizeof(tuner->name)); 1264 1264 else 1265 1265 strscpy(tuner->name, "Radio tuner", sizeof(tuner->name)); ··· 1292 1292 * make sure that cx25840 is in a correct TV / radio mode, 1293 1293 * since calls above may have changed it for tuner / IF demod 1294 1294 */ 1295 - if (vdev->vfl_type == VFL_TYPE_GRABBER) 1295 + if (vdev->vfl_type == VFL_TYPE_VIDEO) 1296 1296 v4l2_subdev_call(cxdev->cx25840, video, s_std, cxdev->norm); 1297 1297 else 1298 1298 v4l2_subdev_call(cxdev->cx25840, tuner, s_radio); ··· 1335 1335 * make sure that cx25840 is in a correct TV / radio mode, 1336 1336 * since calls above may have changed it for tuner / IF demod 1337 1337 */ 1338 - if (vdev->vfl_type == VFL_TYPE_GRABBER) 1338 + if (vdev->vfl_type == VFL_TYPE_VIDEO) 1339 1339 v4l2_subdev_call(cxdev->cx25840, video, s_std, cxdev->norm); 1340 1340 else 1341 1341 v4l2_subdev_call(cxdev->cx25840, tuner, s_radio); ··· 1564 1564 1565 1565 cxusb_vprintk(dvbdev, OPS, "got release\n"); 1566 1566 1567 - if (vdev->vfl_type == VFL_TYPE_GRABBER) 1567 + if (vdev->vfl_type == VFL_TYPE_VIDEO) 1568 1568 ret = vb2_fop_release(f); 1569 1569 else 1570 1570 ret = v4l2_fh_release(f); ··· 1663 1663 cxdev->videodev->lock = &cxdev->dev_lock; 1664 1664 video_set_drvdata(cxdev->videodev, dvbdev); 1665 1665 1666 - ret = video_register_device(cxdev->videodev, VFL_TYPE_GRABBER, -1); 1666 + ret = video_register_device(cxdev->videodev, VFL_TYPE_VIDEO, -1); 1667 1667 if (ret) { 1668 1668 dev_err(&dvbdev->udev->dev, 1669 1669 "video device register failed, ret = %d\n", ret);
+2 -2
drivers/media/usb/em28xx/em28xx-video.c
··· 2141 2141 int ret; 2142 2142 2143 2143 switch (vdev->vfl_type) { 2144 - case VFL_TYPE_GRABBER: 2144 + case VFL_TYPE_VIDEO: 2145 2145 fh_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 2146 2146 break; 2147 2147 case VFL_TYPE_VBI: ··· 2789 2789 } 2790 2790 2791 2791 /* register v4l2 video video_device */ 2792 - ret = video_register_device(&v4l2->vdev, VFL_TYPE_GRABBER, 2792 + ret = video_register_device(&v4l2->vdev, VFL_TYPE_VIDEO, 2793 2793 video_nr[dev->devno]); 2794 2794 if (ret) { 2795 2795 dev_err(&dev->intf->dev,
+1 -1
drivers/media/usb/go7007/go7007-v4l2.c
··· 1138 1138 go7007_s_input(go); 1139 1139 if (go->board_info->sensor_flags & GO7007_SENSOR_TV) 1140 1140 go7007_s_std(go); 1141 - rv = video_register_device(vdev, VFL_TYPE_GRABBER, -1); 1141 + rv = video_register_device(vdev, VFL_TYPE_VIDEO, -1); 1142 1142 if (rv < 0) 1143 1143 return rv; 1144 1144 dev_info(go->dev, "registered device %s [v4l2]\n",
+1 -1
drivers/media/usb/gspca/gspca.c
··· 1555 1555 1556 1556 /* init video stuff */ 1557 1557 ret = video_register_device(&gspca_dev->vdev, 1558 - VFL_TYPE_GRABBER, 1558 + VFL_TYPE_VIDEO, 1559 1559 -1); 1560 1560 if (ret < 0) { 1561 1561 pr_err("video_register_device err %d\n", ret);
+1 -1
drivers/media/usb/hdpvr/hdpvr-video.c
··· 1238 1238 dev->video_dev.v4l2_dev = &dev->v4l2_dev; 1239 1239 video_set_drvdata(&dev->video_dev, dev); 1240 1240 1241 - res = video_register_device(&dev->video_dev, VFL_TYPE_GRABBER, devnum); 1241 + res = video_register_device(&dev->video_dev, VFL_TYPE_VIDEO, devnum); 1242 1242 if (res < 0) { 1243 1243 v4l2_err(&dev->v4l2_dev, "video_device registration failed\n"); 1244 1244 goto error;
+2 -2
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c
··· 1196 1196 hdw = vp->channel.mc_head->hdw; 1197 1197 dip->v4l_type = v4l_type; 1198 1198 switch (v4l_type) { 1199 - case VFL_TYPE_GRABBER: 1199 + case VFL_TYPE_VIDEO: 1200 1200 dip->stream = &vp->channel.mc_head->video_stream; 1201 1201 dip->config = pvr2_config_mpeg; 1202 1202 dip->minor_type = pvr2_v4l_type_video; ··· 1276 1276 /* register streams */ 1277 1277 vp->dev_video = kzalloc(sizeof(*vp->dev_video),GFP_KERNEL); 1278 1278 if (!vp->dev_video) goto fail; 1279 - pvr2_v4l2_dev_init(vp->dev_video,vp,VFL_TYPE_GRABBER); 1279 + pvr2_v4l2_dev_init(vp->dev_video,vp,VFL_TYPE_VIDEO); 1280 1280 if (pvr2_hdw_get_input_available(vp->channel.mc_head->hdw) & 1281 1281 (1 << PVR2_CVAL_INPUT_RADIO)) { 1282 1282 vp->dev_radio = kzalloc(sizeof(*vp->dev_radio),GFP_KERNEL);
+1 -1
drivers/media/usb/pwc/pwc-if.c
··· 1116 1116 pdev->vdev.device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING | 1117 1117 V4L2_CAP_READWRITE; 1118 1118 1119 - rc = video_register_device(&pdev->vdev, VFL_TYPE_GRABBER, -1); 1119 + rc = video_register_device(&pdev->vdev, VFL_TYPE_VIDEO, -1); 1120 1120 if (rc < 0) { 1121 1121 PWC_ERROR("Failed to register as video device (%d).\n", rc); 1122 1122 goto err_unregister_v4l2_dev;
+2 -2
drivers/media/usb/s2255/s2255drv.c
··· 1649 1649 video_set_drvdata(&vc->vdev, vc); 1650 1650 if (video_nr == -1) 1651 1651 ret = video_register_device(&vc->vdev, 1652 - VFL_TYPE_GRABBER, 1652 + VFL_TYPE_VIDEO, 1653 1653 video_nr); 1654 1654 else 1655 1655 ret = video_register_device(&vc->vdev, 1656 - VFL_TYPE_GRABBER, 1656 + VFL_TYPE_VIDEO, 1657 1657 cur_nr + i); 1658 1658 1659 1659 if (ret) {
+1 -1
drivers/media/usb/stk1160/stk1160-v4l.c
··· 830 830 dev->norm); 831 831 832 832 video_set_drvdata(&dev->vdev, dev); 833 - rc = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, -1); 833 + rc = video_register_device(&dev->vdev, VFL_TYPE_VIDEO, -1); 834 834 if (rc < 0) { 835 835 stk1160_err("video_register_device failed (%d)\n", rc); 836 836 return rc;
+1 -1
drivers/media/usb/stkwebcam/stk-webcam.c
··· 1254 1254 dev->vdev.device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | 1255 1255 V4L2_CAP_STREAMING; 1256 1256 video_set_drvdata(&dev->vdev, dev); 1257 - err = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, -1); 1257 + err = video_register_device(&dev->vdev, VFL_TYPE_VIDEO, -1); 1258 1258 if (err) 1259 1259 pr_err("v4l registration failed\n"); 1260 1260 else
+2 -2
drivers/media/usb/tm6000/tm6000-video.c
··· 1300 1300 video_device_node_name(vdev)); 1301 1301 1302 1302 switch (vdev->vfl_type) { 1303 - case VFL_TYPE_GRABBER: 1303 + case VFL_TYPE_VIDEO: 1304 1304 type = V4L2_BUF_TYPE_VIDEO_CAPTURE; 1305 1305 break; 1306 1306 case VFL_TYPE_VBI: ··· 1639 1639 INIT_LIST_HEAD(&dev->vidq.active); 1640 1640 INIT_LIST_HEAD(&dev->vidq.queued); 1641 1641 1642 - ret = video_register_device(&dev->vfd, VFL_TYPE_GRABBER, video_nr); 1642 + ret = video_register_device(&dev->vfd, VFL_TYPE_VIDEO, video_nr); 1643 1643 1644 1644 if (ret < 0) { 1645 1645 printk(KERN_INFO "%s: can't register video device\n",
+1 -1
drivers/media/usb/usbtv/usbtv-video.c
··· 941 941 usbtv->vdev.device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE | 942 942 V4L2_CAP_STREAMING; 943 943 video_set_drvdata(&usbtv->vdev, usbtv); 944 - ret = video_register_device(&usbtv->vdev, VFL_TYPE_GRABBER, -1); 944 + ret = video_register_device(&usbtv->vdev, VFL_TYPE_VIDEO, -1); 945 945 if (ret < 0) { 946 946 dev_warn(usbtv->dev, "Could not register video device\n"); 947 947 goto vdev_fail;
+1 -1
drivers/media/usb/usbvision/usbvision-video.c
··· 1271 1271 if (usbvision->have_tuner) 1272 1272 usbvision->vdev.device_caps |= V4L2_CAP_TUNER; 1273 1273 1274 - if (video_register_device(&usbvision->vdev, VFL_TYPE_GRABBER, video_nr) < 0) 1274 + if (video_register_device(&usbvision->vdev, VFL_TYPE_VIDEO, video_nr) < 0) 1275 1275 goto err_exit; 1276 1276 printk(KERN_INFO "USBVision[%d]: registered USBVision Video device %s [v4l2]\n", 1277 1277 usbvision->nr, video_device_node_name(&usbvision->vdev));
+1 -1
drivers/media/usb/uvc/uvc_driver.c
··· 2014 2014 */ 2015 2015 video_set_drvdata(vdev, stream); 2016 2016 2017 - ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1); 2017 + ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1); 2018 2018 if (ret < 0) { 2019 2019 uvc_printk(KERN_ERR, "Failed to register %s device (%d).\n", 2020 2020 v4l2_type_names[type], ret);
+1 -1
drivers/media/usb/zr364xx/zr364xx.c
··· 1516 1516 V4L2_FIELD_NONE, 1517 1517 sizeof(struct zr364xx_buffer), cam, &cam->lock); 1518 1518 1519 - err = video_register_device(&cam->vdev, VFL_TYPE_GRABBER, -1); 1519 + err = video_register_device(&cam->vdev, VFL_TYPE_VIDEO, -1); 1520 1520 if (err) { 1521 1521 dev_err(&udev->dev, "video_register_device failed\n"); 1522 1522 goto fail;