From: Jacek Anaszewski <j.anaszewski@samsung.com>
To: Muhammad Falak R Wani <falakreyaz@gmail.com>
Cc: Chris Boot <bootc@bootc.net>, Bryan Wu <cooloney@gmail.com>,
Richard Purdie <rpurdie@rpsys.net>,
linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] leds: leds-net48xx: Use devm_led_classdev_register
Date: Mon, 19 Oct 2015 10:16:28 +0200 [thread overview]
Message-ID: <5624A6DC.50503@samsung.com> (raw)
In-Reply-To: <1445038377-11547-1-git-send-email-falakreyaz@gmail.com>
Hi Muhammad,
On 10/17/2015 01:32 AM, Muhammad Falak R Wani wrote:
> Use devm_led_classdev_register instead of led_classdev_register,
> removing the redundant net48xx_led_remove function.
>
> Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
> ---
> drivers/leds/leds-net48xx.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/leds/leds-net48xx.c b/drivers/leds/leds-net48xx.c
> index ec3a2e8..0d214c2 100644
> --- a/drivers/leds/leds-net48xx.c
> +++ b/drivers/leds/leds-net48xx.c
> @@ -39,18 +39,11 @@ 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);
> -}
> -
> -static int net48xx_led_remove(struct platform_device *pdev)
> -{
> - led_classdev_unregister(&net48xx_error_led);
> - return 0;
> + return devm_led_classdev_register(&pdev->dev, &net48xx_error_led);
> }
>
> static struct platform_driver net48xx_led_driver = {
> .probe = net48xx_led_probe,
> - .remove = net48xx_led_remove,
> .driver = {
> .name = DRVNAME,
> },
>
Applied, thanks.
--
Best Regards,
Jacek Anaszewski
prev parent reply other threads:[~2015-10-19 8:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-16 23:32 [PATCH] leds: leds-net48xx: Use devm_led_classdev_register Muhammad Falak R Wani
2015-10-19 8:16 ` Jacek Anaszewski [this message]
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=5624A6DC.50503@samsung.com \
--to=j.anaszewski@samsung.com \
--cc=bootc@bootc.net \
--cc=cooloney@gmail.com \
--cc=falakreyaz@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.