mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
media: ar1335: Use conftest to determine remove return type
Use conftest to determine the return type of .remove() of
struct i2c_driver is int or void type instead of kernel version.
The return type got changed with commit ed5c2f5fd10d ("i2c:
Make remove callback return void")
Bug 4387902
Change-Id: Iceb50b0c9cd78fefb35aef0831b1ea7e8f74d619
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037915
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
32516f4878
commit
e49269929e
@@ -2822,7 +2822,7 @@ static void cam_remove(struct i2c_client *client)
|
||||
if (pwdn_gpio < 0) {
|
||||
dev_err(&client->dev, "Unable to get power GPIO\n");
|
||||
gpio_free(reset_gpio);
|
||||
#if (KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE)
|
||||
#if defined(NV_I2C_DRIVER_STRUCT_REMOVE_RETURN_TYPE_INT) /* Linux 6.1 */
|
||||
return -EINVAL;
|
||||
#else
|
||||
return;
|
||||
@@ -2833,7 +2833,7 @@ static void cam_remove(struct i2c_client *client)
|
||||
gpio_free(pwdn_gpio);
|
||||
|
||||
if (!priv || !priv->pdata)
|
||||
#if (KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE)
|
||||
#if defined(NV_I2C_DRIVER_STRUCT_REMOVE_RETURN_TYPE_INT) /* Linux 6.1 */
|
||||
return -1;
|
||||
#else
|
||||
return;
|
||||
@@ -2876,7 +2876,7 @@ static void cam_remove(struct i2c_client *client)
|
||||
FREE_SAFE(&client->dev, priv->s_data);
|
||||
FREE_SAFE(&client->dev, priv);
|
||||
|
||||
#if (KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE)
|
||||
#if defined(NV_I2C_DRIVER_STRUCT_REMOVE_RETURN_TYPE_INT) /* Linux 6.1 */
|
||||
return 0;
|
||||
#else
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user