From: Jonathan Cameron <jic23@kernel.org>
To: Devendra Naga <develkernel412222@gmail.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-iio@vger.kernel.org, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] staging/iio: use module_platform_driver macro
Date: Sun, 22 Jul 2012 20:28:05 +0100 [thread overview]
Message-ID: <500C5445.3090900@kernel.org> (raw)
In-Reply-To: <1342860895-19401-1-git-send-email-develkernel412222@gmail.com>
On 07/21/2012 09:54 AM, Devendra Naga wrote:
> the code which under _init and _exit does only the platform_driver_register
> and platform_driver_unregister, and nothing else,
> so its better to use the module_platform_driver macro rather duplicating
> its implementation
>
> Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Thanks.
Queued this up for when I resume sending pull requests to Greg
post merge window.
> ---
>
> drivers/staging/iio/iio_hwmon.c | 12 +-----------
> 1 file changed, 1 insertion(+), 11 deletions(-)
>
> diff --git a/drivers/staging/iio/iio_hwmon.c b/drivers/staging/iio/iio_hwmon.c
> index 27d27ec..4bb017a 100644
> --- a/drivers/staging/iio/iio_hwmon.c
> +++ b/drivers/staging/iio/iio_hwmon.c
> @@ -215,17 +215,7 @@ static struct platform_driver __refdata iio_hwmon_driver = {
> .remove = __devexit_p(iio_hwmon_remove),
> };
>
> -static int iio_inkern_init(void)
> -{
> - return platform_driver_register(&iio_hwmon_driver);
> -}
> -module_init(iio_inkern_init);
> -
> -static void iio_inkern_exit(void)
> -{
> - platform_driver_unregister(&iio_hwmon_driver);
> -}
> -module_exit(iio_inkern_exit);
> +module_platform_driver(iio_hwmon_driver);
>
> MODULE_AUTHOR("Jonathan Cameron <jic23@cam.ac.uk>");
> MODULE_DESCRIPTION("IIO to hwmon driver");
>
prev parent reply other threads:[~2012-07-22 19:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-21 8:54 [PATCH 1/2] staging/iio: use module_platform_driver macro Devendra Naga
2012-07-22 19:28 ` Jonathan Cameron [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=500C5445.3090900@kernel.org \
--to=jic23@kernel.org \
--cc=devel@driverdev.osuosl.org \
--cc=develkernel412222@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 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.