]> git.ipfire.org Git - thirdparty/openwrt.git/commit
ath79: mikrotik: fix 6.18 kernel GPIO driver build errors 22771/head
authorShiji Yang <yangshiji66@outlook.com>
Sat, 4 Apr 2026 10:30:15 +0000 (18:30 +0800)
committerNick Hainke <vincent@systemli.org>
Sat, 11 Apr 2026 19:11:07 +0000 (21:11 +0200)
commit15374ca2e7d10ba90b527985a0e33d89444b26b8
treea9af0f4f52b3ed997557998a6716bed48bd08dbf
parent9b76c858e0c126309e4ac87d21dc36ccf7206820
ath79: mikrotik: fix 6.18 kernel GPIO driver build errors

gpio_chip .set() callback return type has been changed since linux
6.17 kernel[1-2]. Fix:

drivers/gpio/gpio-latch-mikrotik.c: In function 'gpio_latch_probe':
drivers/gpio/gpio-latch-mikrotik.c:152:17: error: assignment to 'int (*)(struct gpio_chip *, unsigned int,  int)' from incompatible pointer type 'void (*)(struct gpio_chip *, unsigned int,  int)' [-Wincompatible-pointer-types]
  152 |         gc->set = gpio_latch_set;
      |                 ^

drivers/gpio/gpio-rb4xx.c: In function 'rb4xx_gpio_probe':
drivers/gpio/gpio-rb4xx.c:133:41: error: assignment to 'int (*)(struct gpio_chip *, unsigned int,  int)' from incompatible pointer type 'void (*)(struct gpio_chip *, unsigned int,  int)' [-Wincompatible-pointer-types]
  133 |         gpio->chip.set                  = rb4xx_gpio_set;
      |                                         ^

drivers/gpio/gpio-rb91x-key.c: In function 'gpio_rb91x_key_probe':
drivers/gpio/gpio-rb91x-key.c:165:17: error: assignment to 'int (*)(struct gpio_chip *, unsigned int,  int)' from incompatible pointer type 'void (*)(struct gpio_chip *, unsigned int,  int)' [-Wincompatible-pointer-types]
  165 |         gc->set = gpio_rb91x_key_set;
      |                 ^

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.18.y&id=397a46c9aa3343e8efe6847bdaa124945bab1de4
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-6.18.y&id=d9d87d90cc0b10cd56ae353f50b11417e7d21712
Signed-off-by: Shiji Yang <yangshiji66@outlook.com>
Link: https://github.com/openwrt/openwrt/pull/22771
Signed-off-by: Nick Hainke <vincent@systemli.org>
target/linux/ath79/files/drivers/gpio/gpio-latch-mikrotik.c
target/linux/ath79/files/drivers/gpio/gpio-rb4xx.c
target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c