[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1445511118-12024-1-git-send-email-fmthoker@gmail.com>
Date: Thu, 22 Oct 2015 03:51:58 -0700
From: Fida Mohammad <fmthoker@...il.com>
To: Bryan Wu <cooloney@...il.com>, Richard Purdie <rpurdie@...ys.net>,
Jacek Anaszewski <j.anaszewski@...sung.com>,
linux-leds@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>
Cc: Muhammad Falak <falakreyaz@...il.com>, Chris <bootc@...tc.net>,
Fida Mohammad <fmthoker@...il.com>
Subject: [PATCH] leds: leds-net48xx.c: devm_led_classdev_register
Use of resource managed function devm_led_classdev_register.
Also remove redundant remove function.
Signed-off-by: Fida Mohammad <fmthoker@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists