aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-cobalt-qube.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-15 15:52:42 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-15 15:52:42 -0500
commite81d372ff9f694e13fa46e8b5aaed505c7fd2a1f (patch)
tree058d5004b6ca7602aaec6ef2d992be9c71a8e81c /drivers/leds/leds-cobalt-qube.c
parent75e300c8ba5864367634d946c729d8fd05c1cbc2 (diff)
parent2f05e1d4458f9cb68d4d36fb47e6830fec03c80e (diff)
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-qube.c')
-rw-r--r--drivers/leds/leds-cobalt-qube.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/leds/leds-cobalt-qube.c b/drivers/leds/leds-cobalt-qube.c
index ffa99303b629..8abcb66db01c 100644
--- a/drivers/leds/leds-cobalt-qube.c
+++ b/drivers/leds/leds-cobalt-qube.c
@@ -43,7 +43,7 @@ static int cobalt_qube_led_probe(struct platform_device *pdev)
43 if (!res) 43 if (!res)
44 return -EBUSY; 44 return -EBUSY;
45 45
46 led_port = ioremap(res->start, resource_size(res)); 46 led_port = devm_ioremap(&pdev->dev, res->start, resource_size(res));
47 if (!led_port) 47 if (!led_port)
48 return -ENOMEM; 48 return -ENOMEM;
49 49
@@ -52,12 +52,11 @@ static int cobalt_qube_led_probe(struct platform_device *pdev)
52 52
53 retval = led_classdev_register(&pdev->dev, &qube_front_led); 53 retval = led_classdev_register(&pdev->dev, &qube_front_led);
54 if (retval) 54 if (retval)
55 goto err_iounmap; 55 goto err_null;
56 56
57 return 0; 57 return 0;
58 58
59err_iounmap: 59err_null:
60 iounmap(led_port);
61 led_port = NULL; 60 led_port = NULL;
62 61
63 return retval; 62 return retval;
@@ -67,10 +66,8 @@ static int cobalt_qube_led_remove(struct platform_device *pdev)
67{ 66{
68 led_classdev_unregister(&qube_front_led); 67 led_classdev_unregister(&qube_front_led);
69 68
70 if (led_port) { 69 if (led_port)
71 iounmap(led_port);
72 led_port = NULL; 70 led_port = NULL;
73 }
74 71
75 return 0; 72 return 0;
76} 73}