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 <jonathanh@nvidia.com>
Change-Id: I4f2b75afa05b9ab5f4058b24f4022b0f0a8e6235
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2841045
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2023-01-10 17:57:28 +00:00
committed by mobile promotions
parent bfccd0291a
commit d2024697f3

View File

@@ -955,7 +955,11 @@ static struct isc_mgr_platform_data *of_isc_mgr_pdata(struct platform_device
return pd; return pd;
} }
#if (LINUX_VERSION_CODE < KERNEL_VERSION(6, 2, 0))
static char *isc_mgr_devnode(struct device *dev, umode_t *mode) 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) if (!mode)
return NULL; return NULL;