diff --git a/drivers/media/platform/tegra/cdi/cdi_dev.c b/drivers/media/platform/tegra/cdi/cdi_dev.c index 715638cb..dcba0587 100644 --- a/drivers/media/platform/tegra/cdi/cdi_dev.c +++ b/drivers/media/platform/tegra/cdi/cdi_dev.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -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 diff --git a/drivers/media/platform/tegra/isc/isc_dev.c b/drivers/media/platform/tegra/isc/isc_dev.c index eb4215d4..7f451363 100644 --- a/drivers/media/platform/tegra/isc/isc_dev.c +++ b/drivers/media/platform/tegra/isc/isc_dev.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -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