Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1220200
| From | Muhammad Falak R Wani <falakreyaz@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 1/2] leds: leds-ipaq-micro: Use devm_led_classdev_register |
| Date | 2015-09-07 16:20 +0200 |
| Message-ID | <q65r3-7XI-7@gated-at.bofh.it> (permalink) |
| References | <q65ho-7Mu-29@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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>
---
drivers/leds/leds-ipaq-micro.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/leds/leds-ipaq-micro.c b/drivers/leds/leds-ipaq-micro.c
index 3776f51..1206215 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, µ_led);
+ ret = devm_led_classdev_register(&pdev->dev, µ_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(µ_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);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 0/2] leds: leds-ipaq-micro: Use resource managed functions and fix coding style. Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-09-07 16:10 +0200
[PATCH v2 1/2] leds: leds-ipaq-micro: Use devm_led_classdev_register Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-09-07 16:20 +0200
Re: [PATCH v2 1/2] leds: leds-ipaq-micro: Use devm_led_classdev_register Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-09-07 17:00 +0200
[PATCH v2 2/2] leds: leds-ipaq-micro: Fix coding style issues Muhammad Falak R Wani <falakreyaz@gmail.com> - 2015-09-07 16:20 +0200
Re: [PATCH v2 2/2] leds: leds-ipaq-micro: Fix coding style issues Jacek Anaszewski <j.anaszewski@samsung.com> - 2015-09-07 17:00 +0200
csiph-web