From e2e7d3f512219c06537ce7a3a718cd763f51832e Mon Sep 17 00:00:00 2001 From: Ravi Vembu Date: Wed, 4 Sep 2019 23:07:00 -0500 Subject: [PATCH] cci_intf: Fix v4l2 sub dev index v4l2 subdev index is not the CCI bus number, but the cell index of the i2c master. Crude Fix to get this working Change-Id: Ib220f4207966236f65089590d9c503411f0c525e Signed-off-by: Ravi Vembu Mot-CRs-Fixed: (CR) Reviewed-on: https://gerrit.mot.com/1416011 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Submit-Approved: Jira Key --- .../msm/camera/cam_sensor_module/cam_cci/cci_intf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/cci_intf.c b/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/cci_intf.c index f8c45ddc6a3e..c3b3cbb9aeb4 100644 --- a/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/cci_intf.c +++ b/drivers/media/platform/msm/camera/cam_sensor_module/cam_cci/cci_intf.c @@ -29,7 +29,7 @@ static int32_t cci_intf_xfer( uint16_t addr; struct cam_sensor_cci_client cci_info = { #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) - .cci_subdev = cam_cci_get_subdev(xfer->cci_bus), + .cci_subdev = cam_cci_get_subdev(CCI_DEVICE_0), #else .cci_subdev = cam_cci_get_subdev(), #endif @@ -56,7 +56,7 @@ static int32_t cci_intf_xfer( /* init */ cci_ctrl.cmd = MSM_CCI_INIT; #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) - rc = v4l2_subdev_call(cam_cci_get_subdev(xfer->cci_bus), + rc = v4l2_subdev_call(cam_cci_get_subdev(CCI_DEVICE_0), #else rc = v4l2_subdev_call(cam_cci_get_subdev(), #endif @@ -78,7 +78,7 @@ static int32_t cci_intf_xfer( cci_ctrl.cfg.cci_i2c_read_cfg.data = xfer->data.buf; cci_ctrl.cfg.cci_i2c_read_cfg.num_byte = xfer->data.count; #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) - rc = v4l2_subdev_call(cam_cci_get_subdev(xfer->cci_bus), + rc = v4l2_subdev_call(cam_cci_get_subdev(CCI_DEVICE_0), #else rc = v4l2_subdev_call(cam_cci_get_subdev(), #endif @@ -114,7 +114,7 @@ static int32_t cci_intf_xfer( CAMERA_SENSOR_I2C_TYPE_BYTE; cci_ctrl.cfg.cci_i2c_write_cfg.size = xfer->data.count; #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) - rc = v4l2_subdev_call(cam_cci_get_subdev(xfer->cci_bus), + rc = v4l2_subdev_call(cam_cci_get_subdev(CCI_DEVICE_0), #else rc = v4l2_subdev_call(cam_cci_get_subdev(), #endif @@ -136,7 +136,7 @@ release: /* release */ cci_ctrl.cmd = MSM_CCI_RELEASE; #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,19,0) - rc2 = v4l2_subdev_call(cam_cci_get_subdev(xfer->cci_bus), + rc2 = v4l2_subdev_call(cam_cci_get_subdev(CCI_DEVICE_0), #else rc2 = v4l2_subdev_call(cam_cci_get_subdev(), #endif