mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
media: Fix build for Linux v6.1
Upstream Linux commit ed5c2f5fd10d ("i2c: Make remove callback
return void") in Linux v6.1, updates the i2c remove callback to
prototype to return void instead of int. This is causes the build for
CDI and ISC drivers to fail for Linux v6.1. Update these drivers to
fix the build for Linux v6.1.
Bug 3820317
Bug 3835208
Change-Id: Id71db032896c437017cf2ffa3216353b8472cd6d
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2825008
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
ca3bbfe355
commit
891c93a8fb
@@ -12,6 +12,7 @@
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/version.h>
|
||||
#include <media/cdi-dev.h>
|
||||
#include <uapi/media/cdi-mgr.h>
|
||||
|
||||
@@ -797,7 +798,11 @@ static int cdi_dev_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE
|
||||
static int cdi_dev_remove(struct i2c_client *client)
|
||||
#else
|
||||
static void cdi_dev_remove(struct i2c_client *client)
|
||||
#endif
|
||||
{
|
||||
struct cdi_dev_info *info = i2c_get_clientdata(client);
|
||||
struct device *pdev;
|
||||
@@ -814,7 +819,9 @@ static int cdi_dev_remove(struct i2c_client *client)
|
||||
if (info->cdev.dev)
|
||||
cdev_del(&info->cdev);
|
||||
|
||||
#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/debugfs.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/version.h>
|
||||
#include <media/isc-dev.h>
|
||||
#include <uapi/media/isc-mgr.h>
|
||||
|
||||
@@ -507,7 +508,11 @@ static int isc_dev_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE
|
||||
static int isc_dev_remove(struct i2c_client *client)
|
||||
#else
|
||||
static void isc_dev_remove(struct i2c_client *client)
|
||||
#endif
|
||||
{
|
||||
struct isc_dev_info *info = i2c_get_clientdata(client);
|
||||
struct device *pdev;
|
||||
@@ -524,7 +529,9 @@ static int isc_dev_remove(struct i2c_client *client)
|
||||
if (info->cdev.dev)
|
||||
cdev_del(&info->cdev);
|
||||
|
||||
#if KERNEL_VERSION(6, 1, 0) > LINUX_VERSION_CODE
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
||||
Reference in New Issue
Block a user