media: atomisp: Remove atomisp_subdev_register_video_nodes() helper
authorHans de Goede <hdegoede@redhat.com>
Sun, 7 May 2023 20:19:33 +0000 (21:19 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 9 Jun 2023 13:33:40 +0000 (14:33 +0100)
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>
drivers/staging/media/atomisp/pci/atomisp_subdev.c
drivers/staging/media/atomisp/pci/atomisp_subdev.h
drivers/staging/media/atomisp/pci/atomisp_v4l2.c

index 28554ee4ff67c39ff13e95cf505873cbaec8bdaa..32fc4d25c6639622e38f32c522e450ab234fc464 100644 (file)
@@ -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.
index ee7d0ee5d6e4eb079b1aaacb04f6c268f0af12b8..28afcdd41ef3abb6fe105a33c980d58b727dc3b8 100644 (file)
@@ -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);
index 4370d560308ee8fb2f6108345cdca9520ffef134..f914ab9068c1da5ba0b4230021a530bb9b797b5c 100644 (file)
@@ -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;