media: atomisp: Remove unused fields from struct atomisp_input_subdev
authorHans de Goede <hdegoede@redhat.com>
Sun, 14 May 2023 18:59:13 +0000 (19:59 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 9 Jun 2023 14:01:08 +0000 (15:01 +0100)
Remove unused fields from struct atomisp_input_subdev:

1. frame_size is never used at all
2. sensor_index is always 0, just directly pass 0 in the single user.

Link: https://lore.kernel.org/r/20230518153733.195306-3-hdegoede@redhat.com
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_internal.h
drivers/staging/media/atomisp/pci/atomisp_ioctl.c
drivers/staging/media/atomisp/pci/atomisp_v4l2.c

index feaf4037a389033f688df767091fc2d0c7c40f46..ee0dd5eb4711e028cd8601f71dd9c9f3b0cab97a 100644 (file)
@@ -126,15 +126,12 @@ struct atomisp_input_subdev {
        enum atomisp_camera_port port;
        struct v4l2_subdev *camera;
        struct v4l2_subdev *motor;
-       struct v4l2_frmsizeenum frame_size;
 
        /*
         * To show this resource is used by
         * which stream, in ISP multiple stream mode
         */
        struct atomisp_sub_device *asd;
-
-       int sensor_index;
 };
 
 enum atomisp_dfs_mode {
index 900e4c79cd781de80f691be3cdef4679a53be03a..2cde1af77a2d1f529aa66947c1bda24cd9ad801f 100644 (file)
@@ -673,7 +673,7 @@ static int atomisp_s_input(struct file *file, void *fh, unsigned int input)
 
        /* select operating sensor */
        ret = v4l2_subdev_call(isp->inputs[input].camera, video, s_routing,
-                              0, isp->inputs[input].sensor_index, 0);
+                              0, 0, 0);
        if (ret && (ret != -ENOIOCTLCMD)) {
                dev_err(isp->dev, "Failed to select sensor\n");
                return ret;
index b36dc98f897b3bb524331dffc14384777125f301..e78c738b3008adcbf35922728ade68b020953bf6 100644 (file)
@@ -866,13 +866,6 @@ static int atomisp_subdev_probe(struct atomisp_device *isp)
                        isp->inputs[isp->input_cnt].type = subdevs->type;
                        isp->inputs[isp->input_cnt].port = subdevs->port;
                        isp->inputs[isp->input_cnt].camera = subdevs->subdev;
-                       isp->inputs[isp->input_cnt].sensor_index = 0;
-                       /*
-                        * initialize the subdev frame size, then next we can
-                        * judge whether frame_size store effective value via
-                        * pixel_format.
-                        */
-                       isp->inputs[isp->input_cnt].frame_size.pixel_format = 0;
                        isp->input_cnt++;
                        break;
                case CAMERA_MOTOR: