Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344453
b: refs/heads/master
c: a99d76f
h: refs/heads/master
i:
  344451: b352ca7
v: v3
  • Loading branch information
Jingoo Han authored and Bryan Wu committed Nov 26, 2012
1 parent c728a93 commit 67fd088
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 14ce82e536455ace3d6ca70f77bbc2c6b25b8268
refs/heads/master: a99d76f9eb5336291fa6af713844d1c779484e30
12 changes: 5 additions & 7 deletions trunk/drivers/leds/leds-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,6 @@ static int __devinit create_gpio_led(const struct gpio_led *template,
return 0;
}

ret = gpio_request(template->gpio, template->name);
if (ret < 0)
return ret;

led_dat->cdev.name = template->name;
led_dat->cdev.default_trigger = template->default_trigger;
led_dat->gpio = template->gpio;
Expand All @@ -129,10 +125,12 @@ static int __devinit create_gpio_led(const struct gpio_led *template,
if (!template->retain_state_suspended)
led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;

ret = gpio_direction_output(led_dat->gpio, led_dat->active_low ^ state);
ret = gpio_request_one(template->gpio,
GPIOF_DIR_OUT | (led_dat->active_low ^ state),
template->name);
if (ret < 0)
goto err;
return ret;

INIT_WORK(&led_dat->work, gpio_led_work);

ret = led_classdev_register(parent, &led_dat->cdev);
Expand Down

0 comments on commit 67fd088

Please sign in to comment.