Control: tag -1 + fixed-upstream patch Hi,
On Wed, 12 Feb 2025 14:56:50 +0100 Andreas Beckmann <[email protected]> wrote: > reform2-lpc-dkms fails to build a module for Linux 6.13 in experimental: thank you for reporting this! > CC [M] reform2_lpc.o > reform2_lpc.c: In function 'lpc_probe': > reform2_lpc.c:178:21: error: implicit declaration of function > 'power_supply_register_no_ws'; did you mean 'power_supply_register'? > [-Wimplicit-function-declaration] I fixed this issue upstream: --- a/lpc/reform2_lpc.c +++ b/lpc/reform2_lpc.c @@ -175,7 +175,12 @@ static int lpc_probe(struct spi_device *spi) psy_cfg.of_node = spi->dev.of_node; psy_cfg.drv_data = data; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,13,0) + psy_cfg.no_wakeup_source = true; + data->bat = power_supply_register(&spi->dev, &bat_desc, &psy_cfg); +#else data->bat = power_supply_register_no_ws(&spi->dev, &bat_desc, &psy_cfg); +#endif if (IS_ERR(data->bat)) { printk(KERN_ERR "%s: power_supply_register_no_ws failed\n", __func__); And backported that to the Debian packaging: https://salsa.debian.org/reform-team/reform-tools/-/commit/d616d0b15c427a1324a443551f163ac6f640d8ce > And while you are at it, please add to debian/reform2-lpc-dkms.dkms > > # struct spi_device changed API in v5.18 > BUILD_EXCLUSIVE_KERNEL_MIN="5.18" > > to document the minimal supported kernel version. > There is no need to add support for ancient kernels. > > The error observed up to Linux 5.17 is > > /var/lib/dkms/reform2_lpc/1.66/build/reform2_lpc.c:539:15: error: > initialization of 'int (*)(struct spi_device *)' from incompatible pointer > type 'void (*)(struct spi_device *)' [-Werror=incompatible-pointer-types] > 539 | .remove = lpc_remove, Thank you, fixed here: https://salsa.debian.org/reform-team/reform-tools/-/commit/cea31df9efa21494d85159f6a790de9f57a25d70 I'm surprised you are building dkms modules against such ancient kernel versions but I'm grateful that you reported this issue! Thanks! cheers, josch
signature.asc
Description: signature

