diff --git a/package/kernel/gpio-button-hotplug/Makefile b/package/kernel/gpio-button-hotplug/Makefile index a69da412819..e2402a739cd 100644 --- a/package/kernel/gpio-button-hotplug/Makefile +++ b/package/kernel/gpio-button-hotplug/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=gpio-button-hotplug -PKG_RELEASE:=6 +PKG_RELEASE:=7 PKG_LICENSE:=GPL-2.0 include $(INCLUDE_DIR)/package.mk diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c index e6adb3af1ce..e519bf8a31d 100644 --- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c +++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c @@ -495,6 +495,7 @@ static int gpio_keys_button_probe(struct platform_device *pdev, goto out; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 18, 0) || IS_ENABLED(CONFIG_GPIOLIB_LEGACY) if (gpio_is_valid(button->gpio)) { /* legacy platform data... but is it the lookup table? */ bdata->gpiod = devm_gpiod_get_index(dev, desc, i, @@ -514,7 +515,9 @@ static int gpio_keys_button_probe(struct platform_device *pdev, if (button->active_low ^ gpiod_is_active_low(bdata->gpiod)) gpiod_toggle_active_low(bdata->gpiod); } - } else { + } else +#endif + { /* Device-tree */ struct fwnode_handle *child = device_get_next_child_node(dev, prev);