media: Fix build for Linux v6.3

Upstream Linux commit 03c835f498b5 ("i2c: Switch .probe() to not take an
id parameter") removes the 'id' argument from the I2C probe callback.
Update the various sensor drivers, which define an I2C probe callback
function, to fix building the drivers for Linux v6.3.

Bug 4014315
Bug 4075345

Change-Id: I2dc06188d1d19e086f108013c63439d9381d6c58
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889877
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2023-04-18 13:06:55 +01:00
committed by mobile promotions
parent 11cff41889
commit 3cadadc11c
6 changed files with 24 additions and 0 deletions

View File

@@ -463,8 +463,12 @@ static struct regmap_config max9295_regmap_config = {
.cache_type = REGCACHE_RBTREE, .cache_type = REGCACHE_RBTREE,
}; };
#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE
static int max9295_probe(struct i2c_client *client)
#else
static int max9295_probe(struct i2c_client *client, static int max9295_probe(struct i2c_client *client,
const struct i2c_device_id *id) const struct i2c_device_id *id)
#endif
{ {
struct max9295 *priv; struct max9295 *priv;
int err = 0; int err = 0;

View File

@@ -846,8 +846,12 @@ static struct regmap_config max9296_regmap_config = {
.cache_type = REGCACHE_RBTREE, .cache_type = REGCACHE_RBTREE,
}; };
#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE
static int max9296_probe(struct i2c_client *client)
#else
static int max9296_probe(struct i2c_client *client, static int max9296_probe(struct i2c_client *client,
const struct i2c_device_id *id) const struct i2c_device_id *id)
#endif
{ {
struct max9296 *priv; struct max9296 *priv;
int err = 0; int err = 0;

View File

@@ -201,8 +201,12 @@ static struct regmap_config max96712_regmap_config = {
.cache_type = REGCACHE_RBTREE, .cache_type = REGCACHE_RBTREE,
}; };
#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE
static int max96712_probe(struct i2c_client *client)
#else
static int max96712_probe(struct i2c_client *client, static int max96712_probe(struct i2c_client *client,
const struct i2c_device_id *id) const struct i2c_device_id *id)
#endif
{ {
struct max96712 *priv; struct max96712 *priv;
int err = 0; int err = 0;

View File

@@ -943,8 +943,12 @@ static int ar0234_board_setup(struct ar0234 *priv)
#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE
static int ar0234_probe(struct i2c_client *client)
#else
static int ar0234_probe(struct i2c_client *client, static int ar0234_probe(struct i2c_client *client,
const struct i2c_device_id *id) const struct i2c_device_id *id)
#endif
{ {
struct device *dev = &client->dev; struct device *dev = &client->dev;
struct device_node *node = dev->of_node; struct device_node *node = dev->of_node;

View File

@@ -695,8 +695,12 @@ static const struct v4l2_subdev_internal_ops imx318_subdev_internal_ops = {
.open = imx318_open, .open = imx318_open,
}; };
#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE
static int imx318_probe(struct i2c_client *client)
#else
static int imx318_probe(struct i2c_client *client, static int imx318_probe(struct i2c_client *client,
const struct i2c_device_id *id) const struct i2c_device_id *id)
#endif
{ {
struct device *dev = &client->dev; struct device *dev = &client->dev;
struct tegracam_device *tc_dev; struct tegracam_device *tc_dev;

View File

@@ -747,8 +747,12 @@ error:
return err; return err;
} }
#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE
static int imx390_probe(struct i2c_client *client)
#else
static int imx390_probe(struct i2c_client *client, static int imx390_probe(struct i2c_client *client,
const struct i2c_device_id *id) const struct i2c_device_id *id)
#endif
{ {
struct device *dev = &client->dev; struct device *dev = &client->dev;
struct device_node *node = dev->of_node; struct device_node *node = dev->of_node;