summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-ipaq-micro.c
diff options
context:
space:
mode:
authorMuhammad Falak R Wani <falakreyaz@gmail.com>2015-09-07 17:13:23 +0300
committerJacek Anaszewski <j.anaszewski@samsung.com>2015-11-03 10:59:15 +0300
commit431557f4a44f582f83fd83cbee571baeab24b853 (patch)
tree986b711b3c6449f7535c4ae72cd9c073ec831f4f /drivers/leds/leds-ipaq-micro.c
parent583a2b2cd73c13a91b5f529466dec4d27716d226 (diff)
downloadlinux-431557f4a44f582f83fd83cbee571baeab24b853.tar.xz
leds: leds-ipaq-micro: Use devm_led_classdev_register
Use of resource-managed function devm_led_classdev_register instead of led_classdev_register is preferred, consequently remove redundant function micro_leds_remove. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Diffstat (limited to 'drivers/leds/leds-ipaq-micro.c')
-rw-r--r--drivers/leds/leds-ipaq-micro.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/leds/leds-ipaq-micro.c b/drivers/leds/leds-ipaq-micro.c
index 3776f516cd88..1206215822d7 100644
--- a/drivers/leds/leds-ipaq-micro.c
+++ b/drivers/leds/leds-ipaq-micro.c
@@ -111,7 +111,7 @@ static int micro_leds_probe(struct platform_device *pdev)
{
int ret;
- ret = led_classdev_register(&pdev->dev, &micro_led);
+ ret = devm_led_classdev_register(&pdev->dev, &micro_led);
if (ret) {
dev_err(&pdev->dev, "registering led failed: %d\n", ret);
return ret;
@@ -121,18 +121,11 @@ static int micro_leds_probe(struct platform_device *pdev)
return 0;
}
-static int micro_leds_remove(struct platform_device *pdev)
-{
- led_classdev_unregister(&micro_led);
- return 0;
-}
-
static struct platform_driver micro_leds_device_driver = {
.driver = {
.name = "ipaq-micro-leds",
},
.probe = micro_leds_probe,
- .remove = micro_leds_remove,
};
module_platform_driver(micro_leds_device_driver);