Skip to content

Commit d50403d

Browse files
committed
Merge branch 'fixes-for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED fix from Bryan Wu. * 'fixes-for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: leds: leds-gpio: set devm_gpio_request_one() flags param correctly
2 parents ef05e9b + 2d7c22f commit d50403d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/leds/leds-gpio.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ static int create_gpio_led(const struct gpio_led *template,
127127
led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
128128

129129
ret = devm_gpio_request_one(parent, template->gpio,
130-
GPIOF_DIR_OUT | (led_dat->active_low ^ state),
131-
template->name);
130+
(led_dat->active_low ^ state) ?
131+
GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW,
132+
template->name);
132133
if (ret < 0)
133134
return ret;
134135

0 commit comments

Comments
 (0)