From 3cadadc11c6fabc0cd543a6d2bc9452717e0bb4d Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Tue, 18 Apr 2023 13:06:55 +0100 Subject: [PATCH] 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 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2889877 Reviewed-by: Rohit Khanna GVS: Gerrit_Virtual_Submit --- drivers/media/i2c/max9295.c | 4 ++++ drivers/media/i2c/max9296.c | 4 ++++ drivers/media/i2c/max96712.c | 4 ++++ drivers/media/i2c/nv_ar0234.c | 4 ++++ drivers/media/i2c/nv_imx318.c | 4 ++++ drivers/media/i2c/nv_imx390.c | 4 ++++ 6 files changed, 24 insertions(+) diff --git a/drivers/media/i2c/max9295.c b/drivers/media/i2c/max9295.c index ac9f4c1b..2f69c355 100644 --- a/drivers/media/i2c/max9295.c +++ b/drivers/media/i2c/max9295.c @@ -463,8 +463,12 @@ static struct regmap_config max9295_regmap_config = { .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, const struct i2c_device_id *id) +#endif { struct max9295 *priv; int err = 0; diff --git a/drivers/media/i2c/max9296.c b/drivers/media/i2c/max9296.c index 50168742..0337cb5f 100644 --- a/drivers/media/i2c/max9296.c +++ b/drivers/media/i2c/max9296.c @@ -846,8 +846,12 @@ static struct regmap_config max9296_regmap_config = { .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, const struct i2c_device_id *id) +#endif { struct max9296 *priv; int err = 0; diff --git a/drivers/media/i2c/max96712.c b/drivers/media/i2c/max96712.c index 0f8fcefa..3a05ec6b 100644 --- a/drivers/media/i2c/max96712.c +++ b/drivers/media/i2c/max96712.c @@ -201,8 +201,12 @@ static struct regmap_config max96712_regmap_config = { .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, const struct i2c_device_id *id) +#endif { struct max96712 *priv; int err = 0; diff --git a/drivers/media/i2c/nv_ar0234.c b/drivers/media/i2c/nv_ar0234.c index 625ddbff..c644d57f 100644 --- a/drivers/media/i2c/nv_ar0234.c +++ b/drivers/media/i2c/nv_ar0234.c @@ -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, const struct i2c_device_id *id) +#endif { struct device *dev = &client->dev; struct device_node *node = dev->of_node; diff --git a/drivers/media/i2c/nv_imx318.c b/drivers/media/i2c/nv_imx318.c index e0532554..0a7c8184 100644 --- a/drivers/media/i2c/nv_imx318.c +++ b/drivers/media/i2c/nv_imx318.c @@ -695,8 +695,12 @@ static const struct v4l2_subdev_internal_ops imx318_subdev_internal_ops = { .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, const struct i2c_device_id *id) +#endif { struct device *dev = &client->dev; struct tegracam_device *tc_dev; diff --git a/drivers/media/i2c/nv_imx390.c b/drivers/media/i2c/nv_imx390.c index b22dbab5..74d66d7d 100644 --- a/drivers/media/i2c/nv_imx390.c +++ b/drivers/media/i2c/nv_imx390.c @@ -747,8 +747,12 @@ error: 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, const struct i2c_device_id *id) +#endif { struct device *dev = &client->dev; struct device_node *node = dev->of_node;