Commit c4e94413 authored by Linus Walleij's avatar Linus Walleij Committed by Pavel Machek
Browse files

leds: gpio: Fix semantic error



The leds-gpio driver mixes up the legacy GPIO flags with the
GPIO descriptor flags and passes a legacy flag to
devm_gpiod_get_index().

Fix this by replacing the flags variable with the strict
descriptor flag.

Fixes: 45d4c6de ("leds: gpio: Try to lookup gpiod from device")
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent 302a085c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ static struct gpio_desc *gpio_led_get_gpiod(struct device *dev, int idx,
	 * device, this will hit the board file, if any and get
	 * the GPIO from there.
	 */
	gpiod = devm_gpiod_get_index(dev, NULL, idx, flags);
	gpiod = devm_gpiod_get_index(dev, NULL, idx, GPIOD_OUT_LOW);
	if (!IS_ERR(gpiod)) {
		gpiod_set_consumer_name(gpiod, template->name);
		return gpiod;