media: ivsc: csi: remove privacy status in struct mei_csi
authorWentong Wu <wentong.wu@intel.com>
Fri, 7 Jun 2024 13:25:47 +0000 (21:25 +0800)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Sat, 15 Jun 2024 09:16:39 +0000 (11:16 +0200)
The privacy status is maintained by privacy_ctrl, on which all
of the privacy status changes will go through, so there is no
point in maintaining one more element any more.

Reported-by: Hao Yao <hao.yao@intel.com>
Signed-off-by: Wentong Wu <wentong.wu@intel.com>
Tested-by: Jason Chen <jason.z.chen@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/pci/intel/ivsc/mei_csi.c

index 16791a7f4f157e56283c26335e3785d0c21e9cae..2a9c12c975cac183ebcd4ec7512e744a16b129c6 100644 (file)
@@ -138,9 +138,6 @@ struct mei_csi {
        u32 nr_of_lanes;
        /* frequency of the CSI-2 link */
        u64 link_freq;
-
-       /* privacy status */
-       enum ivsc_privacy_status status;
 };
 
 static const struct v4l2_mbus_framefmt mei_csi_format_mbus_default = {
@@ -271,10 +268,9 @@ static void mei_csi_rx(struct mei_cl_device *cldev)
 
        switch (notif.cmd_id) {
        case CSI_PRIVACY_NOTIF:
-               if (notif.cont.cont < CSI_PRIVACY_MAX) {
-                       csi->status = notif.cont.cont;
-                       v4l2_ctrl_s_ctrl(csi->privacy_ctrl, csi->status);
-               }
+               if (notif.cont.cont < CSI_PRIVACY_MAX)
+                       v4l2_ctrl_s_ctrl(csi->privacy_ctrl,
+                                        notif.cont.cont == CSI_PRIVACY_ON);
                break;
        case CSI_SET_OWNER:
        case CSI_SET_CONF: