Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 319915
b: refs/heads/master
c: 5f9dd5c
h: refs/heads/master
i:
  319913: 5a4a138
  319911: 679613b
v: v3
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Jul 31, 2012
1 parent fb0b25a commit 72d4b75
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 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: b4a74615a4729ca4e6903bd3027339c4e6e7ae03
refs/heads/master: 5f9dd5c9fd4efacc9f8c36c0b3c17a4308bbe4d9
14 changes: 5 additions & 9 deletions trunk/drivers/video/backlight/atmel-pwm-bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ static int atmel_pwm_bl_probe(struct platform_device *pdev)
goto err_free_mem;

if (pwmbl->gpio_on != -1) {
retval = gpio_request(pwmbl->gpio_on, "gpio_atmel_pwm_bl");
retval = devm_gpio_request(&pdev->dev, pwmbl->gpio_on,
"gpio_atmel_pwm_bl");
if (retval) {
pwmbl->gpio_on = -1;
goto err_free_pwm;
Expand All @@ -165,7 +166,7 @@ static int atmel_pwm_bl_probe(struct platform_device *pdev)
retval = gpio_direction_output(pwmbl->gpio_on,
0 ^ pdata->on_active_low);
if (retval)
goto err_free_gpio;
goto err_free_pwm;
}

memset(&props, 0, sizeof(struct backlight_properties));
Expand All @@ -175,7 +176,7 @@ static int atmel_pwm_bl_probe(struct platform_device *pdev)
&atmel_pwm_bl_ops, &props);
if (IS_ERR(bldev)) {
retval = PTR_ERR(bldev);
goto err_free_gpio;
goto err_free_pwm;
}

pwmbl->bldev = bldev;
Expand All @@ -197,9 +198,6 @@ static int atmel_pwm_bl_probe(struct platform_device *pdev)
err_free_bl_dev:
platform_set_drvdata(pdev, NULL);
backlight_device_unregister(bldev);
err_free_gpio:
if (pwmbl->gpio_on != -1)
gpio_free(pwmbl->gpio_on);
err_free_pwm:
pwm_channel_free(&pwmbl->pwmc);
err_free_mem:
Expand All @@ -210,10 +208,8 @@ static int __exit atmel_pwm_bl_remove(struct platform_device *pdev)
{
struct atmel_pwm_bl *pwmbl = platform_get_drvdata(pdev);

if (pwmbl->gpio_on != -1) {
if (pwmbl->gpio_on != -1)
gpio_set_value(pwmbl->gpio_on, 0);
gpio_free(pwmbl->gpio_on);
}
pwm_channel_disable(&pwmbl->pwmc);
pwm_channel_free(&pwmbl->pwmc);
backlight_device_unregister(pwmbl->bldev);
Expand Down

0 comments on commit 72d4b75

Please sign in to comment.