Browse Source

m: camera: sensor: Fix the sensor code for missing symbol

Fix the sensor code failure for i3cdev_to_dev API
which is missing the symbol in the kernel allow list.
CRs-Fixed: 3200508
Change-Id: I99f1ae98e322ae4116cccb9cc7ba42fcc7b8a89a
Signed-off-by: Jigar Agrawal <[email protected]>
Signed-off-by: Depeng Shao <[email protected]>
Signed-off-by: Abhijit Trivedi <[email protected]>
Abhijit Trivedi 3 years ago
parent
commit
e1dbbcb3fe

+ 6 - 1
drivers/cam_sensor_module/cam_sensor/cam_sensor_dev.c

@@ -170,7 +170,12 @@ static int cam_sensor_i3c_driver_probe(struct i3c_device *client)
 	uint32_t                        index;
 	uint32_t                        index;
 	struct device                  *dev;
 	struct device                  *dev;
 
 
-	dev = i3cdev_to_dev(client);
+	if (!client) {
+		CAM_ERR(CAM_CSIPHY, "Invalid input args");
+		return -EINVAL;
+	}
+
+	dev = &client->dev;
 
 
 	CAM_DBG(CAM_SENSOR, "Probe for I3C Slave %s", dev_name(dev));
 	CAM_DBG(CAM_SENSOR, "Probe for I3C Slave %s", dev_name(dev));
 
 

+ 4 - 2
drivers/cam_utils/cam_compat.c

@@ -367,7 +367,8 @@ void cam_compat_util_put_dmabuf_va(struct dma_buf *dmabuf, void *vaddr)
 
 
 void cam_sensor_i3c_driver_remove(struct i3c_device *client)
 void cam_sensor_i3c_driver_remove(struct i3c_device *client)
 {
 {
-	CAM_DBG(CAM_SENSOR, "I3C remove invoked for %s", dev_name(i3cdev_to_dev(client)));
+	CAM_DBG(CAM_SENSOR, "I3C remove invoked for %s",
+		(client ? dev_name(&client->dev) : "none"));
 }
 }
 
 
 #else
 #else
@@ -411,7 +412,8 @@ void cam_compat_util_put_dmabuf_va(struct dma_buf *dmabuf, void *vaddr)
 
 
 int cam_sensor_i3c_driver_remove(struct i3c_device *client)
 int cam_sensor_i3c_driver_remove(struct i3c_device *client)
 {
 {
-	CAM_DBG(CAM_SENSOR, "I3C remove invoked for %s", dev_name(i3cdev_to_dev(client)));
+	CAM_DBG(CAM_SENSOR, "I3C remove invoked for %s",
+		(client ? dev_name(&client->dev) : "none"));
 	return 0;
 	return 0;
 }
 }
 #endif
 #endif