Browse Source

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
Linus Torvalds 12 năm trước cách đây
mục cha
commit
d50403dcc5
1 tập tin đã thay đổi với 3 bổ sung2 xóa
  1. 3 2
      drivers/leds/leds-gpio.c

+ 3 - 2
drivers/leds/leds-gpio.c

@@ -127,8 +127,9 @@ static int create_gpio_led(const struct gpio_led *template,
 		led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
 
 	ret = devm_gpio_request_one(parent, template->gpio,
-			GPIOF_DIR_OUT | (led_dat->active_low ^ state),
-			template->name);
+				    (led_dat->active_low ^ state) ?
+				    GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW,
+				    template->name);
 	if (ret < 0)
 		return ret;