From d2024697f324895aae3cf6fb8b5c32bfe10d2c16 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Tue, 10 Jan 2023 17:57:28 +0000 Subject: [PATCH] media: camera: Fix CDI devnode function pointer for Linux v6.2 Upstream Linux kernel commit ff62b8e6588f ("driver core: make struct class.devnode() take a const *") updated the 'devnode' function pointer under the class structure to take a const device struct. This breaks building the Tegra CDI MDR driver with Linux v6.2. Make the necessary changes to the CDI MGR driver to fix the build breakage. Bug 3936429 Signed-off-by: Jon Hunter Change-Id: I4f2b75afa05b9ab5f4058b24f4022b0f0a8e6235 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2841045 Reviewed-by: Laxman Dewangan GVS: Gerrit_Virtual_Submit --- drivers/media/platform/tegra/isc/isc_mgr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/tegra/isc/isc_mgr.c b/drivers/media/platform/tegra/isc/isc_mgr.c index a2eef766..7e47db0e 100644 --- a/drivers/media/platform/tegra/isc/isc_mgr.c +++ b/drivers/media/platform/tegra/isc/isc_mgr.c @@ -955,7 +955,11 @@ static struct isc_mgr_platform_data *of_isc_mgr_pdata(struct platform_device return pd; } +#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0)) static char *isc_mgr_devnode(struct device *dev, umode_t *mode) +#else +static char *isc_mgr_devnode(const struct device *dev, umode_t *mode) +#endif { if (!mode) return NULL;