From: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
To: "Gujulan Elango,
Hari Prasath (H.)"
<hgujulan-Vi+0cqmPEYlBDgjK7y7TUQ@public.gmane.org>,
"devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org"
<devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org>
Cc: "gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org"
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] staging: nvec: replace led_classdev_register
Date: Mon, 25 Jan 2016 22:00:30 +0100 [thread overview]
Message-ID: <2597303.a4Sc8PqG2R@ax5200p> (raw)
In-Reply-To: <20160121102450.GA10897@IND12F0122>
[-- Attachment #1: Type: text/plain, Size: 1567 bytes --]
Am Donnerstag 21 Januar 2016, 10:23:46 schrieb Gujulan Elango, Hari Prasath:
> From: Hari Prasath Gujulan Elango <hgujulan-Vi+0cqmPEYlBDgjK7y7TUQ@public.gmane.org>
>
> Replace the led_classdev_register() with the platform managed version
> devm_led_classdev_register() & henceforth remove the redundant
> nvec_paz00_remove() function.
>
> Signed-off-by: Hari Prasath Gujulan Elango <hgujulan-Vi+0cqmPEYlBDgjK7y7TUQ@public.gmane.org>
Thanks!
Acked-by: Marc Dietrich <marvin24-Mmb7MZpHnFY@public.gmane.org>
> ---
> drivers/staging/nvec/nvec_paz00.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/staging/nvec/nvec_paz00.c
> b/drivers/staging/nvec/nvec_paz00.c index 68146bf..cddbfd2 100644
> --- a/drivers/staging/nvec/nvec_paz00.c
> +++ b/drivers/staging/nvec/nvec_paz00.c
> @@ -63,7 +63,7 @@ static int nvec_paz00_probe(struct platform_device *pdev)
>
> platform_set_drvdata(pdev, led);
>
> - ret = led_classdev_register(&pdev->dev, &led->cdev);
> + ret = devm_led_classdev_register(&pdev->dev, &led->cdev);
> if (ret < 0)
> return ret;
>
> @@ -73,18 +73,8 @@ static int nvec_paz00_probe(struct platform_device *pdev)
> return 0;
> }
>
> -static int nvec_paz00_remove(struct platform_device *pdev)
> -{
> - struct nvec_led *led = platform_get_drvdata(pdev);
> -
> - led_classdev_unregister(&led->cdev);
> -
> - return 0;
> -}
> -
> static struct platform_driver nvec_paz00_driver = {
> .probe = nvec_paz00_probe,
> - .remove = nvec_paz00_remove,
> .driver = {
> .name = "nvec-paz00",
> },
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
prev parent reply other threads:[~2016-01-25 21:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 10:23 [PATCH] staging: nvec: replace led_classdev_register Gujulan Elango, Hari Prasath (H.)
2016-01-25 21:00 ` Marc Dietrich [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=2597303.a4Sc8PqG2R@ax5200p \
--to=marvin24-mmb7mzphnfy@public.gmane.org \
--cc=devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=hgujulan-Vi+0cqmPEYlBDgjK7y7TUQ@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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).