[PATCH 3/7][Unstable] UBUNTU: SAUCE: media: ivsc: csi: remove privacy status in struct mei_csi

You-Sheng Yang vicamo.yang at canonical.com
Tue Jun 25 09:35:16 UTC 2024


From: Wentong Wu <wentong.wu at intel.com>

BugLink: https://bugs.launchpad.net/bugs/2067364

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 at intel.com>
Signed-off-by: Wentong Wu <wentong.wu at intel.com>
Tested-by: Jason Chen <jason.z.chen at intel.com>
(cherry picked from https://lore.kernel.org/r/all/20240607132547.2820515-4-wentong.wu@intel.com)
Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
 drivers/media/pci/intel/ivsc/mei_csi.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/media/pci/intel/ivsc/mei_csi.c b/drivers/media/pci/intel/ivsc/mei_csi.c
index 16791a7f4f15..2a9c12c975ca 100644
--- a/drivers/media/pci/intel/ivsc/mei_csi.c
+++ b/drivers/media/pci/intel/ivsc/mei_csi.c
@@ -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:
-- 
2.43.0




More information about the kernel-team mailing list