Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 281201
b: refs/heads/master
c: 0445f15
h: refs/heads/master
i:
  281199: 593fa05
v: v3
  • Loading branch information
Arve Hjønnevåg authored and Greg Kroah-Hartman committed Nov 30, 2011
1 parent 484b33a commit 7ddcb5c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 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: 81057ec1ded5ddf15149c3b266f414c0fbde5530
refs/heads/master: 0445f1548fc66a72f3b91cdbe8f26b120245efd1
15 changes: 12 additions & 3 deletions trunk/drivers/staging/android/timed_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,17 @@ static int timed_gpio_probe(struct platform_device *pdev)
gpio_dat->dev.name = cur_gpio->name;
gpio_dat->dev.get_time = gpio_get_time;
gpio_dat->dev.enable = gpio_enable;
ret = timed_output_dev_register(&gpio_dat->dev);
ret = gpio_request(cur_gpio->gpio, cur_gpio->name);
if (ret >= 0) {
ret = timed_output_dev_register(&gpio_dat->dev);
if (ret < 0)
gpio_free(cur_gpio->gpio);
}
if (ret < 0) {
for (j = 0; j < i; j++)
for (j = 0; j < i; j++) {
timed_output_dev_unregister(&gpio_data[i].dev);
gpio_free(gpio_data[i].gpio);
}
kfree(gpio_data);
return ret;
}
Expand All @@ -132,8 +139,10 @@ static int timed_gpio_remove(struct platform_device *pdev)
struct timed_gpio_data *gpio_data = platform_get_drvdata(pdev);
int i;

for (i = 0; i < pdata->num_gpios; i++)
for (i = 0; i < pdata->num_gpios; i++) {
timed_output_dev_unregister(&gpio_data[i].dev);
gpio_free(gpio_data[i].gpio);
}

kfree(gpio_data);

Expand Down

0 comments on commit 7ddcb5c

Please sign in to comment.