Hi, On Sat, 9 Sept 2023 at 04:44, Shiji Yang <yangshij...@outlook.com> wrote: > > From: Shiji Yang <yangshij...@qq.com> > > Since kernel 5.18, the return type in device remove function has > changed from 'int' to 'void'. > > Signed-off-by: Shiji Yang <yangshij...@qq.com> > --- > target/linux/ath79/files/drivers/mfd/rb4xx-cpld.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/target/linux/ath79/files/drivers/mfd/rb4xx-cpld.c > b/target/linux/ath79/files/drivers/mfd/rb4xx-cpld.c > index da18424c63..f10ddef9e2 100644 > --- a/target/linux/ath79/files/drivers/mfd/rb4xx-cpld.c > +++ b/target/linux/ath79/files/drivers/mfd/rb4xx-cpld.c > @@ -22,6 +22,7 @@ > #include <linux/spi/spi.h> > #include <linux/module.h> > #include <linux/of_platform.h> > +#include <linux/version.h> > > #include <mfd/rb4xx-cpld.h> > > @@ -151,9 +152,14 @@ static int rb4xx_cpld_probe(struct spi_device *spi) > NULL, 0, NULL); > } > > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,18,0) > +static void rb4xx_cpld_remove(struct spi_device *spi) > +{ > +#else > static int rb4xx_cpld_remove(struct spi_device *spi) > { > return 0; > +#endif
I'm pretty sure having a remove callback is optional, so why not just delete it since it doesn't do anything anyway? If we ever need one, we can just add one again. Best Regards, Jonas _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel