Skip to content

Commit

Permalink
media: media/platform: rename VFL_TYPE_GRABBER to _VIDEO
Browse files Browse the repository at this point in the history
'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>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Feb 24, 2020
1 parent 3e30a92 commit 70cad44
Show file tree
Hide file tree
Showing 57 changed files with 70 additions and 70 deletions.
2 changes: 1 addition & 1 deletion drivers/media/platform/am437x/am437x-vpfe.c
Original file line number Diff line number Diff line change
Expand Up @@ -2267,7 +2267,7 @@ static int vpfe_probe_complete(struct vpfe_device *vpfe)
vdev->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING |
V4L2_CAP_READWRITE;
video_set_drvdata(vdev, vpfe);
err = video_register_device(&vpfe->video_dev, VFL_TYPE_GRABBER, -1);
err = video_register_device(&vpfe->video_dev, VFL_TYPE_VIDEO, -1);
if (err) {
vpfe_err(vpfe,
"Unable to register video device.\n");
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/platform/aspeed-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -1582,14 +1582,14 @@ static int aspeed_video_setup_video(struct aspeed_video *video)
V4L2_CAP_STREAMING;
vdev->v4l2_dev = v4l2_dev;
strscpy(vdev->name, DEVICE_NAME, sizeof(vdev->name));
vdev->vfl_type = VFL_TYPE_GRABBER;
vdev->vfl_type = VFL_TYPE_VIDEO;
vdev->vfl_dir = VFL_DIR_RX;
vdev->release = video_device_release_empty;
vdev->ioctl_ops = &aspeed_video_ioctl_ops;
vdev->lock = &video->video_lock;

video_set_drvdata(vdev, video);
rc = video_register_device(vdev, VFL_TYPE_GRABBER, 0);
rc = video_register_device(vdev, VFL_TYPE_VIDEO, 0);
if (rc) {
vb2_queue_release(vbq);
v4l2_ctrl_handler_free(&video->ctrl_handler);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/atmel/atmel-isc-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2311,7 +2311,7 @@ static int isc_async_complete(struct v4l2_async_notifier *notifier)
vdev->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_CAPTURE;
video_set_drvdata(vdev, isc);

ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
if (ret < 0) {
v4l2_err(&isc->v4l2_dev,
"video_register_device failed: %d\n", ret);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/atmel/atmel-isi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ static int isi_graph_notify_complete(struct v4l2_async_notifier *notifier)
return ret;
}

ret = video_register_device(isi->vdev, VFL_TYPE_GRABBER, -1);
ret = video_register_device(isi->vdev, VFL_TYPE_VIDEO, -1);
if (ret) {
dev_err(isi->dev, "Failed to register video device\n");
return ret;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/coda/coda-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -2726,7 +2726,7 @@ static int coda_register_device(struct coda_dev *dev, int i)
v4l2_disable_ioctl(vfd, VIDIOC_G_CROP);
v4l2_disable_ioctl(vfd, VIDIOC_S_CROP);

ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
ret = video_register_device(vfd, VFL_TYPE_VIDEO, 0);
if (!ret)
v4l2_info(&dev->v4l2_dev, "%s registered as %s\n",
type == CODA_INST_ENCODER ? "encoder" : "decoder",
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/davinci/vpbe_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,7 @@ static int register_device(struct vpbe_layer *vpbe_display_layer,

vpbe_display_layer->video_dev.queue = &vpbe_display_layer->buffer_queue;
err = video_register_device(&vpbe_display_layer->video_dev,
VFL_TYPE_GRABBER,
VFL_TYPE_VIDEO,
-1);
if (err)
return -ENODEV;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/davinci/vpfe_capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -1780,7 +1780,7 @@ static int vpfe_probe(struct platform_device *pdev)
"video_dev=%p\n", &vpfe_dev->video_dev);
vpfe_dev->fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
ret = video_register_device(&vpfe_dev->video_dev,
VFL_TYPE_GRABBER, -1);
VFL_TYPE_VIDEO, -1);

if (ret) {
v4l2_err(pdev->dev.driver,
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/davinci/vpif_capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,7 @@ static int vpif_probe_complete(void)
vdev->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
video_set_drvdata(&ch->video_dev, ch);
err = video_register_device(vdev,
VFL_TYPE_GRABBER, (j ? 1 : 0));
VFL_TYPE_VIDEO, (j ? 1 : 0));
if (err)
goto probe_out;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/davinci/vpif_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ static int vpif_probe_complete(void)
vdev->lock = &common->lock;
vdev->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING;
video_set_drvdata(&ch->video_dev, ch);
err = video_register_device(vdev, VFL_TYPE_GRABBER,
err = video_register_device(vdev, VFL_TYPE_VIDEO,
(j ? 3 : 2));
if (err < 0)
goto probe_out;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/exynos-gsc/gsc-m2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ int gsc_register_m2m_device(struct gsc_dev *gsc)
return PTR_ERR(gsc->m2m.m2m_dev);
}

ret = video_register_device(&gsc->vdev, VFL_TYPE_GRABBER, -1);
ret = video_register_device(&gsc->vdev, VFL_TYPE_VIDEO, -1);
if (ret) {
dev_err(&pdev->dev,
"%s(): failed to register video device\n", __func__);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/exynos4-is/fimc-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,7 @@ static int fimc_register_capture_device(struct fimc_dev *fimc,
if (ret)
goto err_me_cleanup;

ret = video_register_device(vfd, VFL_TYPE_GRABBER, -1);
ret = video_register_device(vfd, VFL_TYPE_VIDEO, -1);
if (ret)
goto err_ctrl_free;

Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/exynos4-is/fimc-isp-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,7 @@ int fimc_isp_video_device_register(struct fimc_isp *isp,

video_set_drvdata(vdev, isp);

ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
if (ret < 0) {
media_entity_cleanup(&vdev->entity);
return ret;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/exynos4-is/fimc-lite.c
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ static int fimc_lite_subdev_registered(struct v4l2_subdev *sd)
video_set_drvdata(vfd, fimc);
fimc->ve.pipe = v4l2_get_subdev_hostdata(sd);

ret = video_register_device(vfd, VFL_TYPE_GRABBER, -1);
ret = video_register_device(vfd, VFL_TYPE_VIDEO, -1);
if (ret < 0) {
media_entity_cleanup(&vfd->entity);
fimc->ve.pipe = NULL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/exynos4-is/fimc-m2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ int fimc_register_m2m_device(struct fimc_dev *fimc,
if (ret)
goto err_me;

ret = video_register_device(vfd, VFL_TYPE_GRABBER, -1);
ret = video_register_device(vfd, VFL_TYPE_VIDEO, -1);
if (ret)
goto err_vd;

Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/fsl-viu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1486,7 +1486,7 @@ static int viu_of_probe(struct platform_device *op)

mutex_lock(&viu_dev->lock);

ret = video_register_device(viu_dev->vdev, VFL_TYPE_GRABBER, -1);
ret = video_register_device(viu_dev->vdev, VFL_TYPE_VIDEO, -1);
if (ret < 0) {
video_device_release(viu_dev->vdev);
goto err_unlock;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/imx-pxp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ static int pxp_probe(struct platform_device *pdev)
goto err_v4l2;
}

ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
ret = video_register_device(vfd, VFL_TYPE_VIDEO, 0);
if (ret) {
v4l2_err(&dev->v4l2_dev, "Failed to register video device\n");
goto err_m2m;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/m2m-deinterlace.c
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ static int deinterlace_probe(struct platform_device *pdev)
vfd->lock = &pcdev->dev_mutex;
vfd->v4l2_dev = &pcdev->v4l2_dev;

ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
ret = video_register_device(vfd, VFL_TYPE_VIDEO, 0);
if (ret) {
v4l2_err(&pcdev->v4l2_dev, "Failed to register video device\n");
goto unreg_dev;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/marvell-ccic/mcam-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ static int mccic_notify_bound(struct v4l2_async_notifier *notifier,
cam->vdev.lock = &cam->s_mutex;
cam->vdev.queue = &cam->vb_queue;
video_set_drvdata(&cam->vdev, cam);
ret = video_register_device(&cam->vdev, VFL_TYPE_GRABBER, -1);
ret = video_register_device(&cam->vdev, VFL_TYPE_VIDEO, -1);
if (ret) {
cam->sensor = NULL;
goto out;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1150,7 +1150,7 @@ static int mtk_jpeg_probe(struct platform_device *pdev)
jpeg->dec_vdev->device_caps = V4L2_CAP_STREAMING |
V4L2_CAP_VIDEO_M2M_MPLANE;

ret = video_register_device(jpeg->dec_vdev, VFL_TYPE_GRABBER, 3);
ret = video_register_device(jpeg->dec_vdev, VFL_TYPE_VIDEO, 3);
if (ret) {
v4l2_err(&jpeg->v4l2_dev, "Failed to register video device\n");
goto err_dec_vdev_register;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/mtk-mdp/mtk_mdp_m2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -1229,7 +1229,7 @@ int mtk_mdp_register_m2m_device(struct mtk_mdp_dev *mdp)
goto err_m2m_init;
}

ret = video_register_device(mdp->vdev, VFL_TYPE_GRABBER, 2);
ret = video_register_device(mdp->vdev, VFL_TYPE_VIDEO, 2);
if (ret) {
dev_err(dev, "failed to register video device\n");
goto err_vdev_register;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/mtk-vcodec/mtk_vcodec_dec_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
goto err_event_workq;
}

ret = video_register_device(vfd_dec, VFL_TYPE_GRABBER, 0);
ret = video_register_device(vfd_dec, VFL_TYPE_VIDEO, 0);
if (ret) {
mtk_v4l2_err("Failed to register video device");
goto err_dec_reg;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/mtk-vcodec/mtk_vcodec_enc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ static int mtk_vcodec_probe(struct platform_device *pdev)
goto err_event_workq;
}

ret = video_register_device(vfd_enc, VFL_TYPE_GRABBER, 1);
ret = video_register_device(vfd_enc, VFL_TYPE_VIDEO, 1);
if (ret) {
mtk_v4l2_err("Failed to register video device");
goto err_enc_reg;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/mx2_emmaprp.c
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,7 @@ static int emmaprp_probe(struct platform_device *pdev)
goto rel_vdev;
}

ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
ret = video_register_device(vfd, VFL_TYPE_VIDEO, 0);
if (ret) {
v4l2_err(&pcdev->v4l2_dev, "Failed to register video device\n");
goto rel_m2m;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/omap/omap_vout.c
Original file line number Diff line number Diff line change
Expand Up @@ -1500,7 +1500,7 @@ static int __init omap_vout_create_video_devices(struct platform_device *pdev)
/* Register the Video device with V4L2
*/
vfd = vout->vfd;
if (video_register_device(vfd, VFL_TYPE_GRABBER, -1) < 0) {
if (video_register_device(vfd, VFL_TYPE_VIDEO, -1) < 0) {
dev_err(&pdev->dev,
": Could not register Video for Linux device\n");
vfd->minor = -1;
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/platform/omap3isp/ispvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@ int omap3isp_video_init(struct isp_video *video, const char *name)
video->video.fops = &isp_video_fops;
snprintf(video->video.name, sizeof(video->video.name),
"OMAP3 ISP %s %s", name, direction);
video->video.vfl_type = VFL_TYPE_GRABBER;
video->video.vfl_type = VFL_TYPE_VIDEO;
video->video.release = video_device_release_empty;
video->video.ioctl_ops = &isp_video_ioctl_ops;
if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
Expand Down Expand Up @@ -1484,7 +1484,7 @@ int omap3isp_video_register(struct isp_video *video, struct v4l2_device *vdev)

video->video.v4l2_dev = vdev;

ret = video_register_device(&video->video, VFL_TYPE_GRABBER, -1);
ret = video_register_device(&video->video, VFL_TYPE_VIDEO, -1);
if (ret < 0)
dev_err(video->isp->dev,
"%s: could not register video device (%d)\n",
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/pxa_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -2191,7 +2191,7 @@ static int pxa_camera_sensor_bound(struct v4l2_async_notifier *notifier,
if (err)
goto out_sensor_poweroff;

err = video_register_device(&pcdev->vdev, VFL_TYPE_GRABBER, -1);
err = video_register_device(&pcdev->vdev, VFL_TYPE_VIDEO, -1);
if (err) {
v4l2_err(v4l2_dev, "register video device failed: %d\n", err);
pcdev->sensor = NULL;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/qcom/camss/camss-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ int msm_video_register(struct camss_video *video, struct v4l2_device *v4l2_dev,
vdev->lock = &video->lock;
strscpy(vdev->name, name, sizeof(vdev->name));

ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
if (ret < 0) {
dev_err(v4l2_dev->dev, "Failed to register video device: %d\n",
ret);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/qcom/venus/vdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1458,7 +1458,7 @@ static int vdec_probe(struct platform_device *pdev)
vdev->v4l2_dev = &core->v4l2_dev;
vdev->device_caps = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING;

ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
if (ret)
goto err_vdev_release;

Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/qcom/venus/venc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ static int venc_probe(struct platform_device *pdev)
vdev->v4l2_dev = &core->v4l2_dev;
vdev->device_caps = V4L2_CAP_VIDEO_M2M_MPLANE | V4L2_CAP_STREAMING;

ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
if (ret)
goto err_vdev_release;

Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/rcar-vin/rcar-v4l2.c
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,7 @@ int rvin_v4l2_register(struct rvin_dev *vin)

rvin_format_align(vin, &vin->format);

ret = video_register_device(&vin->vdev, VFL_TYPE_GRABBER, -1);
ret = video_register_device(&vin->vdev, VFL_TYPE_VIDEO, -1);
if (ret) {
vin_err(vin, "Failed to register video device\n");
return ret;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/rcar_fdp1.c
Original file line number Diff line number Diff line change
Expand Up @@ -2344,7 +2344,7 @@ static int fdp1_probe(struct platform_device *pdev)
video_set_drvdata(vfd, fdp1);
strscpy(vfd->name, fdp1_videodev.name, sizeof(vfd->name));

ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
ret = video_register_device(vfd, VFL_TYPE_VIDEO, 0);
if (ret) {
v4l2_err(&fdp1->v4l2_dev, "Failed to register video device\n");
goto release_m2m;
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/platform/rcar_jpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1663,7 +1663,7 @@ static int jpu_probe(struct platform_device *pdev)
jpu->vfd_encoder.device_caps = V4L2_CAP_STREAMING |
V4L2_CAP_VIDEO_M2M_MPLANE;

ret = video_register_device(&jpu->vfd_encoder, VFL_TYPE_GRABBER, -1);
ret = video_register_device(&jpu->vfd_encoder, VFL_TYPE_VIDEO, -1);
if (ret) {
v4l2_err(&jpu->v4l2_dev, "Failed to register video device\n");
goto m2m_init_rollback;
Expand All @@ -1682,7 +1682,7 @@ static int jpu_probe(struct platform_device *pdev)
jpu->vfd_decoder.device_caps = V4L2_CAP_STREAMING |
V4L2_CAP_VIDEO_M2M_MPLANE;

ret = video_register_device(&jpu->vfd_decoder, VFL_TYPE_GRABBER, -1);
ret = video_register_device(&jpu->vfd_decoder, VFL_TYPE_VIDEO, -1);
if (ret) {
v4l2_err(&jpu->v4l2_dev, "Failed to register video device\n");
goto enc_vdev_register_rollback;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/renesas-ceu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1450,7 +1450,7 @@ static int ceu_notify_complete(struct v4l2_async_notifier *notifier)
V4L2_CAP_STREAMING;
video_set_drvdata(vdev, ceudev);

ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
if (ret < 0) {
v4l2_err(vdev->v4l2_dev,
"video_register_device failed: %d\n", ret);
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/rockchip/rga/rga.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ static int rga_probe(struct platform_device *pdev)
def_frame.stride = (def_frame.width * def_frame.fmt->depth) >> 3;
def_frame.size = def_frame.stride * def_frame.height;

ret = video_register_device(vfd, VFL_TYPE_GRABBER, -1);
ret = video_register_device(vfd, VFL_TYPE_VIDEO, -1);
if (ret) {
v4l2_err(&rga->v4l2_dev, "Failed to register video device\n");
goto rel_vdev;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/s3c-camif/camif-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ int s3c_camif_register_video_node(struct camif_dev *camif, int idx)
vfd->ctrl_handler = &vp->ctrl_handler;
vfd->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_CAPTURE;

ret = video_register_device(vfd, VFL_TYPE_GRABBER, -1);
ret = video_register_device(vfd, VFL_TYPE_VIDEO, -1);
if (ret)
goto err_ctrlh_free;

Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/s5p-g2d/g2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ static int g2d_probe(struct platform_device *pdev)
vfd->lock = &dev->mutex;
vfd->v4l2_dev = &dev->v4l2_dev;
vfd->device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING;
ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0);
ret = video_register_device(vfd, VFL_TYPE_VIDEO, 0);
if (ret) {
v4l2_err(&dev->v4l2_dev, "Failed to register video device\n");
goto rel_vdev;
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/platform/s5p-jpeg/jpeg-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2946,7 +2946,7 @@ static int s5p_jpeg_probe(struct platform_device *pdev)
jpeg->vfd_encoder->vfl_dir = VFL_DIR_M2M;
jpeg->vfd_encoder->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M;

ret = video_register_device(jpeg->vfd_encoder, VFL_TYPE_GRABBER, -1);
ret = video_register_device(jpeg->vfd_encoder, VFL_TYPE_VIDEO, -1);
if (ret) {
v4l2_err(&jpeg->v4l2_dev, "Failed to register video device\n");
video_device_release(jpeg->vfd_encoder);
Expand Down Expand Up @@ -2976,7 +2976,7 @@ static int s5p_jpeg_probe(struct platform_device *pdev)
jpeg->vfd_decoder->vfl_dir = VFL_DIR_M2M;
jpeg->vfd_decoder->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_VIDEO_M2M;

ret = video_register_device(jpeg->vfd_decoder, VFL_TYPE_GRABBER, -1);
ret = video_register_device(jpeg->vfd_decoder, VFL_TYPE_VIDEO, -1);
if (ret) {
v4l2_err(&jpeg->v4l2_dev, "Failed to register video device\n");
video_device_release(jpeg->vfd_decoder);
Expand Down
4 changes: 2 additions & 2 deletions drivers/media/platform/s5p-mfc/s5p_mfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1376,15 +1376,15 @@ static int s5p_mfc_probe(struct platform_device *pdev)
s5p_mfc_init_regs(dev);

/* Register decoder and encoder */
ret = video_register_device(dev->vfd_dec, VFL_TYPE_GRABBER, 0);
ret = video_register_device(dev->vfd_dec, VFL_TYPE_VIDEO, 0);
if (ret) {
v4l2_err(&dev->v4l2_dev, "Failed to register video device\n");
goto err_dec_reg;
}
v4l2_info(&dev->v4l2_dev,
"decoder registered as /dev/video%d\n", dev->vfd_dec->num);

ret = video_register_device(dev->vfd_enc, VFL_TYPE_GRABBER, 0);
ret = video_register_device(dev->vfd_enc, VFL_TYPE_VIDEO, 0);
if (ret) {
v4l2_err(&dev->v4l2_dev, "Failed to register video device\n");
goto err_enc_reg;
Expand Down
2 changes: 1 addition & 1 deletion drivers/media/platform/sh_veu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1160,7 +1160,7 @@ static int sh_veu_probe(struct platform_device *pdev)
pm_runtime_enable(&pdev->dev);
pm_runtime_resume(&pdev->dev);

ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
pm_runtime_suspend(&pdev->dev);
if (ret < 0)
goto evidreg;
Expand Down
Loading

0 comments on commit 70cad44

Please sign in to comment.