projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'for-v3.8-part2' of git://git.infradead.org/battery-2.6
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
leds
/
leds-cobalt-qube.c
diff --git
a/drivers/leds/leds-cobalt-qube.c
b/drivers/leds/leds-cobalt-qube.c
index ffa99303b629143877a09ce0d4ba828967a72f0f..8abcb66db01c2c587f7e85c91e296e324947027e 100644
(file)
--- 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)
if (!res)
return -EBUSY;
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;
if (!led_port)
return -ENOMEM;
@@
-52,12
+52,11
@@
static int cobalt_qube_led_probe(struct platform_device *pdev)
retval = led_classdev_register(&pdev->dev, &qube_front_led);
if (retval)
retval = led_classdev_register(&pdev->dev, &qube_front_led);
if (retval)
- goto err_
iounmap
;
+ goto err_
null
;
return 0;
return 0;
-err_iounmap:
- iounmap(led_port);
+err_null:
led_port = NULL;
return retval;
led_port = NULL;
return retval;
@@
-67,10
+66,8
@@
static int cobalt_qube_led_remove(struct platform_device *pdev)
{
led_classdev_unregister(&qube_front_led);
{
led_classdev_unregister(&qube_front_led);
- if (led_port) {
- iounmap(led_port);
+ if (led_port)
led_port = NULL;
led_port = NULL;
- }
return 0;
}
return 0;
}