From: Fida Mohammad <fmthoker@gmail.com>
To: Bryan Wu <cooloney@gmail.com>, Richard Purdie <rpurdie@rpsys.net>,
Jacek Anaszewski <j.anaszewski@samsung.com>,
linux-leds@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Cc: Muhammad Falak <falakreyaz@gmail.com>, Chris <bootc@bootc.net>,
Fida Mohammad <fmthoker@gmail.com>
Subject: [PATCH] leds: leds-net48xx.c: devm_led_classdev_register
Date: Thu, 22 Oct 2015 03:51:58 -0700 [thread overview]
Message-ID: <1445511118-12024-1-git-send-email-fmthoker@gmail.com> (raw)
Use of resource managed function devm_led_classdev_register.
Also remove redundant remove function.
Signed-off-by: Fida Mohammad <fmthoker@gmail.com>
---
drivers/leds/leds-net48xx.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/leds/leds-net48xx.c b/drivers/leds/leds-net48xx.c
index ec3a2e8..148ddb1 100644
--- a/drivers/leds/leds-net48xx.c
+++ b/drivers/leds/leds-net48xx.c
@@ -39,18 +39,12 @@ static struct led_classdev net48xx_error_led = {
static int net48xx_led_probe(struct platform_device *pdev)
{
- return led_classdev_register(&pdev->dev, &net48xx_error_led);
+ return devm_led_classdev_register(&pdev->dev, &net48xx_error_led);
}
-static int net48xx_led_remove(struct platform_device *pdev)
-{
- led_classdev_unregister(&net48xx_error_led);
- return 0;
-}
static struct platform_driver net48xx_led_driver = {
.probe = net48xx_led_probe,
- .remove = net48xx_led_remove,
.driver = {
.name = DRVNAME,
},
--
1.9.1
reply other threads:[~2015-10-22 10:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1445511118-12024-1-git-send-email-fmthoker@gmail.com \
--to=fmthoker@gmail.com \
--cc=bootc@bootc.net \
--cc=cooloney@gmail.com \
--cc=falakreyaz@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
all inboxes | Powered by JetHome®