msm: camera: sensor: Removing some dead code
Removing some dead code, the power info and soc private are never used after assignment. CRs-Fixed: 3376960 Change-Id: I0038cad043ea53ffd18d711f338e094ff0f919cc Signed-off-by: Depeng Shao <quic_depengs@quicinc.com>
This commit is contained in:

committed by
Camera Software Integration

parent
3f157fddcd
commit
40f354b732
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "cam_actuator_dev.h"
|
||||
@@ -270,8 +270,6 @@ static void cam_actuator_i2c_component_unbind(struct device *dev,
|
||||
{
|
||||
struct i2c_client *client = NULL;
|
||||
struct cam_actuator_ctrl_t *a_ctrl = NULL;
|
||||
struct cam_actuator_soc_private *soc_private;
|
||||
struct cam_sensor_power_ctrl_t *power_info;
|
||||
|
||||
client = container_of(dev, struct i2c_client, dev);
|
||||
if (!client) {
|
||||
@@ -292,9 +290,6 @@ static void cam_actuator_i2c_component_unbind(struct device *dev,
|
||||
cam_actuator_shutdown(a_ctrl);
|
||||
mutex_unlock(&(a_ctrl->actuator_mutex));
|
||||
cam_unregister_subdev(&(a_ctrl->v4l2_dev_str));
|
||||
soc_private =
|
||||
(struct cam_actuator_soc_private *)a_ctrl->soc_info.soc_private;
|
||||
power_info = &soc_private->power_info;
|
||||
|
||||
/*Free Allocated Mem */
|
||||
kfree(a_ctrl->i2c_data.per_frame);
|
||||
@@ -455,8 +450,6 @@ static void cam_actuator_platform_component_unbind(struct device *dev,
|
||||
struct device *master_dev, void *data)
|
||||
{
|
||||
struct cam_actuator_ctrl_t *a_ctrl;
|
||||
struct cam_actuator_soc_private *soc_private;
|
||||
struct cam_sensor_power_ctrl_t *power_info;
|
||||
bool i3c_i2c_target;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
@@ -475,10 +468,6 @@ static void cam_actuator_platform_component_unbind(struct device *dev,
|
||||
mutex_unlock(&(a_ctrl->actuator_mutex));
|
||||
cam_unregister_subdev(&(a_ctrl->v4l2_dev_str));
|
||||
|
||||
soc_private =
|
||||
(struct cam_actuator_soc_private *)a_ctrl->soc_info.soc_private;
|
||||
power_info = &soc_private->power_info;
|
||||
|
||||
kfree(a_ctrl->io_master_info.cci_client);
|
||||
a_ctrl->io_master_info.cci_client = NULL;
|
||||
kfree(a_ctrl->soc_info.soc_private);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "cam_ois_dev.h"
|
||||
@@ -252,8 +252,6 @@ static void cam_ois_i2c_component_unbind(struct device *dev,
|
||||
struct i2c_client *client = NULL;
|
||||
struct cam_ois_ctrl_t *o_ctrl = NULL;
|
||||
struct cam_hw_soc_info *soc_info;
|
||||
struct cam_ois_soc_private *soc_private;
|
||||
struct cam_sensor_power_ctrl_t *power_info;
|
||||
|
||||
client = container_of(dev, struct i2c_client, dev);
|
||||
if (!client) {
|
||||
@@ -285,10 +283,6 @@ static void cam_ois_i2c_component_unbind(struct device *dev,
|
||||
mutex_unlock(&(o_ctrl->ois_mutex));
|
||||
cam_unregister_subdev(&(o_ctrl->v4l2_dev_str));
|
||||
|
||||
soc_private =
|
||||
(struct cam_ois_soc_private *)soc_info->soc_private;
|
||||
power_info = &soc_private->power_info;
|
||||
|
||||
kfree(o_ctrl->soc_info.soc_private);
|
||||
v4l2_set_subdevdata(&o_ctrl->v4l2_dev_str.sd, NULL);
|
||||
kfree(o_ctrl);
|
||||
@@ -430,8 +424,6 @@ static void cam_ois_component_unbind(struct device *dev,
|
||||
{
|
||||
int i;
|
||||
struct cam_ois_ctrl_t *o_ctrl;
|
||||
struct cam_ois_soc_private *soc_private;
|
||||
struct cam_sensor_power_ctrl_t *power_info;
|
||||
struct cam_hw_soc_info *soc_info;
|
||||
bool i3c_i2c_target;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
@@ -462,10 +454,6 @@ static void cam_ois_component_unbind(struct device *dev,
|
||||
mutex_unlock(&(o_ctrl->ois_mutex));
|
||||
cam_unregister_subdev(&(o_ctrl->v4l2_dev_str));
|
||||
|
||||
soc_private =
|
||||
(struct cam_ois_soc_private *)o_ctrl->soc_info.soc_private;
|
||||
power_info = &soc_private->power_info;
|
||||
|
||||
kfree(o_ctrl->soc_info.soc_private);
|
||||
kfree(o_ctrl->io_master_info.cci_client);
|
||||
platform_set_drvdata(pdev, NULL);
|
||||
|
Reference in New Issue
Block a user