From: Muhammad Falak R Wani <falakreyaz@gmail.com>
To: Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
Jacek Anaszewski <j.anaszewski@samsung.com>,
linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Muhammad Falak R Wani <falakreyaz@gmail.com>
Subject: [PATCH v2 1/2] leds: leds-ipaq-micro: Use devm_led_classdev_register
Date: Mon, 7 Sep 2015 19:43:23 +0530 [thread overview]
Message-ID: <1441635204-3634-2-git-send-email-falakreyaz@gmail.com> (raw)
In-Reply-To: <1441635204-3634-1-git-send-email-falakreyaz@gmail.com>
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
next prev parent reply other threads:[~2015-09-07 14:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-07 14:13 [PATCH v2 0/2] leds: leds-ipaq-micro: Use resource managed functions and fix coding style Muhammad Falak R Wani
2015-09-07 14:13 ` Muhammad Falak R Wani [this message]
2015-09-07 14:58 ` [PATCH v2 1/2] leds: leds-ipaq-micro: Use devm_led_classdev_register Jacek Anaszewski
2015-09-07 14:13 ` [PATCH v2 2/2] leds: leds-ipaq-micro: Fix coding style issues Muhammad Falak R Wani
2015-09-07 14:54 ` Jacek Anaszewski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441635204-3634-2-git-send-email-falakreyaz@gmail.com \
--to=falakreyaz@gmail.com \
--cc=cooloney@gmail.com \
--cc=j.anaszewski@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).