Skip to content

Commit 9cd42be

Browse files
committed
Merge tag 'gpio-fixes-for-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fix from Bartosz Golaszewski: - fix a use-case where no pins are mapped to GPIOs in gpiochip_generic_config() * tag 'gpio-fixes-for-v6.8-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpiolib: Handle no pin_ranges in gpiochip_generic_config()
2 parents 76d885a + ae366ba commit 9cd42be

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/gpio/gpiolib.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,6 +2042,11 @@ EXPORT_SYMBOL_GPL(gpiochip_generic_free);
20422042
int gpiochip_generic_config(struct gpio_chip *gc, unsigned int offset,
20432043
unsigned long config)
20442044
{
2045+
#ifdef CONFIG_PINCTRL
2046+
if (list_empty(&gc->gpiodev->pin_ranges))
2047+
return -ENOTSUPP;
2048+
#endif
2049+
20452050
return pinctrl_gpio_set_config(gc, offset, config);
20462051
}
20472052
EXPORT_SYMBOL_GPL(gpiochip_generic_config);

0 commit comments

Comments
 (0)