From 9d0e75ed46a7f419b66bc9bcd3070452d64abc50 Mon Sep 17 00:00:00 2001 From: Abhilash Mahapatra Date: Tue, 19 Mar 2024 23:33:02 +0530 Subject: [PATCH] msm: camera: sensor: Cleaning redundant code Change includes proper handling of identical code in if-else conditional blocks. CIDs-Fixed: 116678, 115377 CRs-Fixed: 3764553 Change-Id: Ib83b6644a5df741d299af76f30ed5137c657415e Signed-off-by: Abhilash Mahapatra --- .../cam_sensor_module/cam_csiphy/cam_csiphy_core.c | 5 +---- drivers/cam_sensor_module/cam_flash/cam_flash_core.c | 11 +++-------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/cam_sensor_module/cam_csiphy/cam_csiphy_core.c b/drivers/cam_sensor_module/cam_csiphy/cam_csiphy_core.c index a1b2f1f68e..dc39cc5a8f 100644 --- a/drivers/cam_sensor_module/cam_csiphy/cam_csiphy_core.c +++ b/drivers/cam_sensor_module/cam_csiphy/cam_csiphy_core.c @@ -631,10 +631,7 @@ static int cam_csiphy_sanitize_lane_cnt( max_supported_lanes = 2; } else if (csiphy_dev->cphy_dphy_combo_mode) { /* 2DPHY + 1CPHY or 2CPHY + 1DPHY */ - if (csiphy_dev->csiphy_info[index].csiphy_3phase) - max_supported_lanes = 2; - else - max_supported_lanes = 2; + max_supported_lanes = 2; } else { /* Mission Mode */ if (csiphy_dev->csiphy_info[index].csiphy_3phase) diff --git a/drivers/cam_sensor_module/cam_flash/cam_flash_core.c b/drivers/cam_sensor_module/cam_flash/cam_flash_core.c index 9159c4ed88..df052b6166 100644 --- a/drivers/cam_sensor_module/cam_flash/cam_flash_core.c +++ b/drivers/cam_sensor_module/cam_flash/cam_flash_core.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2017-2021, The Linux Foundation. All rights reserved. - * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include @@ -1818,13 +1818,8 @@ int cam_flash_pmic_pkt_parser(struct cam_flash_ctrl *fctrl, void *arg) if ((csl_packet->header.op_code & 0xFFFFF) == CAM_FLASH_PACKET_OPCODE_SET_OPS) { add_req.trigger_eof = true; - if (flash_data->opcode == CAMERA_SENSOR_FLASH_OP_OFF) { - add_req.skip_at_sof = 1; - add_req.skip_at_eof = 0; - } else { - add_req.skip_at_sof = 1; - add_req.skip_at_eof = 0; - } + add_req.skip_at_sof = 1; + add_req.skip_at_eof = 0; } if (fctrl->bridge_intf.crm_cb &&