Commit 7fbbbc78 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent e653614e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1042,7 +1042,7 @@ static int au0828_v4l2_close(struct file *filp)
		dev->streaming_users, dev->users);

	mutex_lock(&dev->lock);
	if (vdev->vfl_type == VFL_TYPE_GRABBER && dev->vid_timeout_running) {
	if (vdev->vfl_type == VFL_TYPE_VIDEO && dev->vid_timeout_running) {
		/* Cancel timeout thread in case they didn't call streamoff */
		dev->vid_timeout_running = 0;
		del_timer_sync(&dev->vid_timeout);
@@ -2007,7 +2007,7 @@ int au0828_analog_register(struct au0828_dev *dev,

	/* Register the v4l2 device */
	video_set_drvdata(&dev->vdev, dev);
	retval = video_register_device(&dev->vdev, VFL_TYPE_GRABBER, -1);
	retval = video_register_device(&dev->vdev, VFL_TYPE_VIDEO, -1);
	if (retval != 0) {
		dprintk(1, "unable to register video device (error = %d).\n",
			retval);
+1 −1
Original line number Diff line number Diff line
@@ -1134,7 +1134,7 @@ int cpia2_register_camera(struct camera_data *cam)
	reset_camera_struct_v4l(cam);

	/* register v4l device */
	if (video_register_device(&cam->vdev, VFL_TYPE_GRABBER, video_nr) < 0) {
	if (video_register_device(&cam->vdev, VFL_TYPE_VIDEO, video_nr) < 0) {
		ERR("video_register_device failed\n");
		return -ENODEV;
	}
+1 −1
Original line number Diff line number Diff line
@@ -1790,7 +1790,7 @@ int cx231xx_417_register(struct cx231xx *dev)
	dev->v4l_device.queue = q;

	err = video_register_device(&dev->v4l_device,
		VFL_TYPE_GRABBER, -1);
		VFL_TYPE_VIDEO, -1);
	if (err < 0) {
		dprintk(3, "%s: can't register mpeg device\n", dev->name);
		v4l2_ctrl_handler_free(&dev->mpeg_ctrl_handler.hdl);
+1 −1
Original line number Diff line number Diff line
@@ -1785,7 +1785,7 @@ int cx231xx_register_analog_devices(struct cx231xx *dev)
		dev->vdev.device_caps |= V4L2_CAP_TUNER;

	/* register v4l2 video video_device */
	ret = video_register_device(&dev->vdev, VFL_TYPE_GRABBER,
	ret = video_register_device(&dev->vdev, VFL_TYPE_VIDEO,
				    video_nr[dev->devno]);
	if (ret) {
		dev_err(dev->dev,
+6 −6
Original line number Diff line number Diff line
@@ -1223,7 +1223,7 @@ static int cxusb_medion_g_tuner(struct file *file, void *fh,
	if (tuner->index != 0)
		return -EINVAL;

	if (vdev->vfl_type == VFL_TYPE_GRABBER)
	if (vdev->vfl_type == VFL_TYPE_VIDEO)
		tuner->type = V4L2_TUNER_ANALOG_TV;
	else
		tuner->type = V4L2_TUNER_RADIO;
@@ -1259,7 +1259,7 @@ static int cxusb_medion_g_tuner(struct file *file, void *fh,
	if (ret != 0)
		return ret;

	if (vdev->vfl_type == VFL_TYPE_GRABBER)
	if (vdev->vfl_type == VFL_TYPE_VIDEO)
		strscpy(tuner->name, "TV tuner", sizeof(tuner->name));
	else
		strscpy(tuner->name, "Radio tuner", sizeof(tuner->name));
@@ -1292,7 +1292,7 @@ static int cxusb_medion_s_tuner(struct file *file, void *fh,
	 * make sure that cx25840 is in a correct TV / radio mode,
	 * since calls above may have changed it for tuner / IF demod
	 */
	if (vdev->vfl_type == VFL_TYPE_GRABBER)
	if (vdev->vfl_type == VFL_TYPE_VIDEO)
		v4l2_subdev_call(cxdev->cx25840, video, s_std, cxdev->norm);
	else
		v4l2_subdev_call(cxdev->cx25840, tuner, s_radio);
@@ -1335,7 +1335,7 @@ static int cxusb_medion_s_frequency(struct file *file, void *fh,
	 * make sure that cx25840 is in a correct TV / radio mode,
	 * since calls above may have changed it for tuner / IF demod
	 */
	if (vdev->vfl_type == VFL_TYPE_GRABBER)
	if (vdev->vfl_type == VFL_TYPE_VIDEO)
		v4l2_subdev_call(cxdev->cx25840, video, s_std, cxdev->norm);
	else
		v4l2_subdev_call(cxdev->cx25840, tuner, s_radio);
@@ -1564,7 +1564,7 @@ static int cxusb_videoradio_release(struct file *f)

	cxusb_vprintk(dvbdev, OPS, "got release\n");

	if (vdev->vfl_type == VFL_TYPE_GRABBER)
	if (vdev->vfl_type == VFL_TYPE_VIDEO)
		ret = vb2_fop_release(f);
	else
		ret = v4l2_fh_release(f);
@@ -1663,7 +1663,7 @@ static int cxusb_medion_register_analog_video(struct dvb_usb_device *dvbdev)
	cxdev->videodev->lock = &cxdev->dev_lock;
	video_set_drvdata(cxdev->videodev, dvbdev);

	ret = video_register_device(cxdev->videodev, VFL_TYPE_GRABBER, -1);
	ret = video_register_device(cxdev->videodev, VFL_TYPE_VIDEO, -1);
	if (ret) {
		dev_err(&dvbdev->udev->dev,
			"video device register failed, ret = %d\n", ret);
Loading