Revert "msm: camera: eeprom: set platform driver data to null"

This reverts commit 61023d53cb.

Change-Id: I669f466a717638f6451bf160cb44475ec266650a
Signed-off-by: Fan Haizhou <haizhoufan@codeaurora.org>
This commit is contained in:
Haizhou Fan
2018-12-06 14:36:48 +08:00
parent 97134d3355
commit 85481d9259

View File

@@ -261,10 +261,9 @@ static int cam_eeprom_i2c_driver_remove(struct i2c_client *client)
for (i = 0; i < soc_info->num_clk; i++)
devm_clk_put(soc_info->dev, soc_info->clk[i]);
mutex_destroy(&(e_ctrl->eeprom_mutex));
kfree(soc_private);
kfree(e_ctrl->io_master_info.cci_client);
v4l2_set_subdevdata(&e_ctrl->v4l2_dev_str.sd, NULL);
if (soc_private)
kfree(soc_private);
kfree(e_ctrl);
return 0;
@@ -395,8 +394,6 @@ static int cam_eeprom_spi_driver_remove(struct spi_device *sdev)
kfree(soc_private->power_info.gpio_num_info);
kfree(soc_private);
}
mutex_destroy(&(e_ctrl->eeprom_mutex));
v4l2_set_subdevdata(&e_ctrl->v4l2_dev_str.sd, NULL);
kfree(e_ctrl);
return 0;
@@ -492,11 +489,8 @@ static int cam_eeprom_platform_driver_remove(struct platform_device *pdev)
for (i = 0; i < soc_info->num_clk; i++)
devm_clk_put(soc_info->dev, soc_info->clk[i]);
mutex_destroy(&(e_ctrl->eeprom_mutex));
kfree(soc_info->soc_private);
kfree(e_ctrl->io_master_info.cci_client);
platform_set_drvdata(pdev, NULL);
v4l2_set_subdevdata(&e_ctrl->v4l2_dev_str.sd, NULL);
kfree(e_ctrl);
return 0;
}