Skip to contentSkip to conversation

drivers/gpio: Account for changes in kernel 6.9

PATCH New Jan Kiszka 1 participant 1 message May 22, 2024

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 drivers/gpio: Account for changes in kernel 6.9

From: Jan Kiszka <[email protected]>

gpio_device_find now takes only const data, but we are feeding in structure we need to modify - typecast accordingly.

---
 kernel/drivers/gpio/gpio-core.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
kernel/drivers/gpio/gpio-core.c +5 -1
index 5cf59c4688..a3cfe66ae5 100644
@@ -610,9 +610,13 @@ struct gpiochip_match_data {
 	struct list_head list;
 };
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,9,0)
+static int match_gpio_chip(struct gpio_chip *gc, const void *data)
+#else
 static int match_gpio_chip(struct gpio_chip *gc, void *data)
+#endif
 {
-	struct gpiochip_match_data *d = data;
+	struct gpiochip_match_data *d = (void *)data;
 	struct gpiochip_holder *h;
 
 	if (gc->parent == d->parent) {
Signature · 1 line
2.43.0