Quellcode durchsuchen

msm: camera: sensor: i2c driver remove call return value change

Due to i2c driver remove call return value changed from int to void
from 6.1 kernel version.

CRs-Fixed: 3366233
Change-Id: I81713fdd65a53af37b0b9c573407587755bc1bae
Signed-off-by: Soumen Ghosh <[email protected]>
Soumen Ghosh vor 2 Jahren
Ursprung
Commit
57ba3a5181

+ 8 - 0
drivers/cam_sensor_module/cam_actuator/cam_actuator_dev.c

@@ -334,12 +334,20 @@ static int32_t cam_actuator_driver_i2c_probe(struct i2c_client *client,
 	return rc;
 }
 
+#if KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE
+void cam_actuator_driver_i2c_remove(
+	struct i2c_client *client)
+{
+	component_del(&client->dev, &cam_actuator_i2c_component_ops);
+}
+#else
 static int32_t cam_actuator_driver_i2c_remove(
 	struct i2c_client *client)
 {
 	component_del(&client->dev, &cam_actuator_i2c_component_ops);
 	return 0;
 }
+#endif
 
 static int cam_actuator_platform_component_bind(struct device *dev,
 	struct device *master_dev, void *data)

+ 7 - 0
drivers/cam_sensor_module/cam_eeprom/cam_eeprom_dev.c

@@ -355,12 +355,19 @@ static int cam_eeprom_i2c_driver_probe(struct i2c_client *client,
 	return rc;
 }
 
+#if KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE
+void cam_eeprom_i2c_driver_remove(struct i2c_client *client)
+{
+	component_del(&client->dev, &cam_eeprom_i2c_component_ops);
+}
+#else
 static int cam_eeprom_i2c_driver_remove(struct i2c_client *client)
 {
 	component_del(&client->dev, &cam_eeprom_i2c_component_ops);
 
 	return 0;
 }
+#endif
 
 static int cam_eeprom_spi_setup(struct spi_device *spi)
 {

+ 8 - 0
drivers/cam_sensor_module/cam_flash/cam_flash_dev.c

@@ -764,12 +764,20 @@ static int32_t cam_flash_i2c_driver_probe(struct i2c_client *client,
 	return rc;
 }
 
+#if KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE
+void cam_flash_i2c_driver_remove(struct i2c_client *client)
+{
+	component_del(&client->dev, &cam_flash_i2c_component_ops);
+}
+
+#else
 static int32_t cam_flash_i2c_driver_remove(struct i2c_client *client)
 {
 	component_del(&client->dev, &cam_flash_i2c_component_ops);
 
 	return 0;
 }
+#endif
 
 MODULE_DEVICE_TABLE(of, cam_flash_dt_match);
 

+ 7 - 0
drivers/cam_sensor_module/cam_ois/cam_ois_dev.c

@@ -324,12 +324,19 @@ static int cam_ois_i2c_driver_probe(struct i2c_client *client,
 	return rc;
 }
 
+#if KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE
+void cam_ois_i2c_driver_remove(struct i2c_client *client)
+{
+	component_del(&client->dev, &cam_ois_i2c_component_ops);
+}
+#else
 static int cam_ois_i2c_driver_remove(struct i2c_client *client)
 {
 	component_del(&client->dev, &cam_ois_i2c_component_ops);
 
 	return 0;
 }
+#endif
 
 static int cam_ois_component_bind(struct device *dev,
 	struct device *master_dev, void *data)

+ 8 - 0
drivers/cam_sensor_module/cam_sensor/cam_sensor_dev.c

@@ -377,12 +377,20 @@ static int cam_sensor_i2c_driver_probe(struct i2c_client *client,
 	return rc;
 }
 
+#if KERNEL_VERSION(6, 1, 0) <= LINUX_VERSION_CODE
+void cam_sensor_i2c_driver_remove(struct i2c_client *client)
+{
+	component_del(&client->dev, &cam_sensor_i2c_component_ops);
+}
+
+#else
 static int cam_sensor_i2c_driver_remove(struct i2c_client *client)
 {
 	component_del(&client->dev, &cam_sensor_i2c_component_ops);
 
 	return 0;
 }
+#endif
 
 static int cam_sensor_component_bind(struct device *dev,
 	struct device *master_dev, void *data)

+ 0 - 1
drivers/cam_smmu/cam_smmu_api.c

@@ -16,7 +16,6 @@
 #include <linux/workqueue.h>
 #include <linux/genalloc.h>
 #include <linux/debugfs.h>
-#include <linux/dma-iommu.h>
 
 #include <soc/qcom/secure_buffer.h>
 

+ 2 - 0
drivers/cam_utils/cam_compat.h

@@ -13,7 +13,9 @@
 #include <linux/iommu.h>
 #include <linux/qcom_scm.h>
 #include <linux/list_sort.h>
+#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE
 #include <linux/dma-iommu.h>
+#endif
 #include <soc/qcom/of_common.h>
 #include <linux/spi/spi.h>