gpiolib: remove unneeded WARN_ON() from gpiochip_set_multiple()
PATCH 1/1 gpiolib: remove unneeded WARN_ON() from gpiochip_set_multiple()
From: Bartosz Golaszewski <[email protected]>
GPIO drivers are not required to support set_multiple() - the core will fallback to calling set() for each line if it's missing. Remove the offending check from gpiochip_set_multiple().
--- drivers/gpio/gpiolib.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpio/gpiolib.c +0 -3
@@ -3608,9 +3608,6 @@ static int gpiochip_set_multiple(struct gpio_chip *gc,lockdep_assert_held (&gc->gpiodev->srcu); -if (WARN_ON (unlikely (!gc->set_multiple && !gc->set_multiple_rv))) -return -EOPNOTSUPP ; -if (gc->set_multiple_rv) { ret = gc->set_multiple_rv (gc, mask, bits);if (ret >0 )
Signature · 1 line
2.45.2
Quoted 10 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
GPIO drivers are not required to support
set_multiple()- the core will fallback to callingset()for each line if it's missing. Remove the offending check fromgpiochip_set_multiple().Fixes 98ce1eb1fd87 ("gpiolib: introduce gpio_chip setters that return values")Reported-by Marek Szyprowski <[email protected]>Signed-off-by Bartosz Golaszewski <[email protected]>
That's right.
Yours,
Linus Walleij
Bartosz Golaszewski
AppliedFrom: Bartosz Golaszewski <[email protected]>
Quoted 5 lines · Bartosz Golaszewski
GPIO drivers are not required to support
set_multiple()- the core will fallback to callingset()for each line if it's missing. Remove the offending check fromgpiochip_set_multiple().
Applied, thanks!
[1/1] gpiolib: remove unneeded WARN_ON() from gpiochip_set_multiple()
commit: 8014097f1466f7e034844770c537b8dc7d98811f
Best regards,
Signature · 1 line
Bartosz Golaszewski <[email protected]>