diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-16 00:52:42 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-16 00:52:42 +0400 |
commit | e81d372ff9f694e13fa46e8b5aaed505c7fd2a1f (patch) | |
tree | 058d5004b6ca7602aaec6ef2d992be9c71a8e81c /drivers/leds/leds-cobalt-raq.c | |
parent | 75e300c8ba5864367634d946c729d8fd05c1cbc2 (diff) | |
parent | 2f05e1d4458f9cb68d4d36fb47e6830fec03c80e (diff) | |
download | linux-e81d372ff9f694e13fa46e8b5aaed505c7fd2a1f.tar.xz |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem update from Bryan Wu.
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (47 commits)
leds: leds-lp5521: return an error code on error in probe()
leds: leds-clevo-mail: Use pr_* instead of printks
leds: leds-rb532: Fix checkpatch errors
leds: led-triggers: Fix checkpatch warnings
leds: ledtrig-backlight: Fix checkpatch error
leds: leds-wrap: Use <linux/io.h> instead of <asm/io.h>
leds: leds-wm8350: Use dev_err instead of printk
leds: leds-pwm: Fix checkpatch warning
leds: leds-pca955x: Use dev_info instead of printk
leds: leds-net48xx: Use linux/io.h instead of asm/io.h
leds: leds-lt3593: Fix checkpatch warnings
leds: leds-gpio: Use dev_info instead of printk
leds: leds-da903x: Fix checkpatch error and warnings
leds: leds-bd2802: Fix checkpatch warnings
leds: leds-adp5520: Fix checkpatch warnings
leds: led-class: Fix checkpatch warning
leds: leds-ns2: use devm_gpio_request_one
leds: leds-lt3593: use devm_gpio_request_one
leds: leds-gpio: use devm_gpio_request_one
leds: lp3944: Fix return value
...
Diffstat (limited to 'drivers/leds/leds-cobalt-raq.c')
-rw-r--r-- | drivers/leds/leds-cobalt-raq.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/leds/leds-cobalt-raq.c b/drivers/leds/leds-cobalt-raq.c index d52e47de396f..001088b31373 100644 --- a/drivers/leds/leds-cobalt-raq.c +++ b/drivers/leds/leds-cobalt-raq.c @@ -85,13 +85,13 @@ static int cobalt_raq_led_probe(struct platform_device *pdev) if (!res) return -EBUSY; - led_port = ioremap(res->start, resource_size(res)); + led_port = devm_ioremap(&pdev->dev, res->start, resource_size(res)); if (!led_port) return -ENOMEM; retval = led_classdev_register(&pdev->dev, &raq_power_off_led); if (retval) - goto err_iounmap; + goto err_null; retval = led_classdev_register(&pdev->dev, &raq_web_led); if (retval) @@ -102,8 +102,7 @@ static int cobalt_raq_led_probe(struct platform_device *pdev) err_unregister: led_classdev_unregister(&raq_power_off_led); -err_iounmap: - iounmap(led_port); +err_null: led_port = NULL; return retval; @@ -114,10 +113,8 @@ static int cobalt_raq_led_remove(struct platform_device *pdev) led_classdev_unregister(&raq_power_off_led); led_classdev_unregister(&raq_web_led); - if (led_port) { - iounmap(led_port); + if (led_port) led_port = NULL; - } return 0; } |