Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344455
b: refs/heads/master
c: 31c3dc7
h: refs/heads/master
i:
  344453: 67fd088
  344451: b352ca7
  344447: a9e92ac
v: v3
  • Loading branch information
Jingoo Han authored and Bryan Wu committed Nov 26, 2012
1 parent c4a901b commit b680235
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 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: 507d967bc1d103695440e27f888244e014bcf7be
refs/heads/master: 31c3dc7488f2564fc398d5a416726031f56d6343
21 changes: 7 additions & 14 deletions trunk/drivers/leds/leds-ns2.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,25 +191,18 @@ create_ns2_led(struct platform_device *pdev, struct ns2_led_data *led_dat,
int ret;
enum ns2_led_modes mode;

ret = gpio_request(template->cmd, template->name);
if (ret == 0) {
ret = gpio_direction_output(template->cmd,
gpio_get_value(template->cmd));
if (ret)
gpio_free(template->cmd);
}
ret = gpio_request_one(template->cmd,
GPIOF_DIR_OUT | gpio_get_value(template->cmd),
template->name);
if (ret) {
dev_err(&pdev->dev, "%s: failed to setup command GPIO\n",
template->name);
return ret;
}

ret = gpio_request(template->slow, template->name);
if (ret == 0) {
ret = gpio_direction_output(template->slow,
gpio_get_value(template->slow));
if (ret)
gpio_free(template->slow);
}
ret = gpio_request_one(template->slow,
GPIOF_DIR_OUT | gpio_get_value(template->slow),
template->name);
if (ret) {
dev_err(&pdev->dev, "%s: failed to setup slow GPIO\n",
template->name);
Expand Down

0 comments on commit b680235

Please sign in to comment.