mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 15:43:35 -04:00
media: atomisp: Remove atomisp_subdev_register_video_nodes() helper
Now that there is only 1 /dev/video# node left there is no need to do this in a helper. Just make atomisp_register_device_nodes() call video_register_device() directly. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
8fd3c9a468
commit
28714506c3
@@ -1001,24 +1001,6 @@ int atomisp_subdev_register_subdev(struct atomisp_sub_device *asd,
|
||||
return v4l2_device_register_subdev(vdev, &asd->subdev);
|
||||
}
|
||||
|
||||
int atomisp_subdev_register_video_nodes(struct atomisp_sub_device *asd,
|
||||
struct v4l2_device *vdev)
|
||||
{
|
||||
int ret;
|
||||
|
||||
asd->video_out.vdev.v4l2_dev = vdev;
|
||||
asd->video_out.vdev.device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
|
||||
ret = video_register_device(&asd->video_out.vdev, VFL_TYPE_VIDEO, -1);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
atomisp_subdev_unregister_entities(asd);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
* atomisp_subdev_init - ISP Subdevice initialization.
|
||||
* @dev: Device pointer specific to the ATOM ISP.
|
||||
|
||||
@@ -367,8 +367,6 @@ void atomisp_subdev_cleanup_pending_events(struct atomisp_sub_device *asd);
|
||||
void atomisp_subdev_unregister_entities(struct atomisp_sub_device *asd);
|
||||
int atomisp_subdev_register_subdev(struct atomisp_sub_device *asd,
|
||||
struct v4l2_device *vdev);
|
||||
int atomisp_subdev_register_video_nodes(struct atomisp_sub_device *asd,
|
||||
struct v4l2_device *vdev);
|
||||
int atomisp_subdev_init(struct atomisp_device *isp);
|
||||
void atomisp_subdev_cleanup(struct atomisp_device *isp);
|
||||
int atomisp_create_pads_links(struct atomisp_device *isp);
|
||||
|
||||
@@ -1016,7 +1016,9 @@ static int atomisp_register_device_nodes(struct atomisp_device *isp)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = atomisp_subdev_register_video_nodes(&isp->asd, &isp->v4l2_dev);
|
||||
isp->asd.video_out.vdev.v4l2_dev = &isp->v4l2_dev;
|
||||
isp->asd.video_out.vdev.device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING;
|
||||
err = video_register_device(&isp->asd.video_out.vdev, VFL_TYPE_VIDEO, -1);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user