From: "Hans J. Koch" <hjk@hansjkoch.de>
To: Axel Lin <axel.lin@gmail.com>
Cc: linux-kernel@vger.kernel.org,
"Uwe Kleine-König" <Uwe.Kleine-Koenig@digi.com>,
"Magnus Damm" <damm@igel.co.jp>,
"Amit Chatterjee" <amit.chatterjee@ti.com>,
"Pratheesh Gangadhar" <pratheesh@ti.com>,
"Hans J. Koch" <hjk@hansjkoch.de>,
"Greg Kroah-Hartman" <gregkh@suse.de>
Subject: Re: [PATCH] uio: convert drivers/uio/* to use module_platform_driver()
Date: Mon, 28 Nov 2011 21:30:06 +0100 [thread overview]
Message-ID: <20111128203006.GD2165@local> (raw)
In-Reply-To: <1322291935.20464.5.camel@phoenix>
On Sat, Nov 26, 2011 at 03:18:55PM +0800, Axel Lin wrote:
> This patch converts the drivers in drivers/uio/* to use the
> module_platform_driver() macro which makes the code smaller and a bit
> simpler.
>
> Cc: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
> Cc: Magnus Damm <damm@igel.co.jp>
> Cc: Amit Chatterjee <amit.chatterjee@ti.com>
> Cc: Pratheesh Gangadhar <pratheesh@ti.com>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Looks alright to me.
Signed-off-by: Hans J. Koch <hjk@hansjkoch.de>
Thanks,
Hans
> ---
> drivers/uio/uio_pdrv.c | 12 +-----------
> drivers/uio/uio_pdrv_genirq.c | 13 +------------
> drivers/uio/uio_pruss.c | 14 +-------------
> 3 files changed, 3 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/uio/uio_pdrv.c b/drivers/uio/uio_pdrv.c
> index ff50595..72d3646 100644
> --- a/drivers/uio/uio_pdrv.c
> +++ b/drivers/uio/uio_pdrv.c
> @@ -104,17 +104,7 @@ static struct platform_driver uio_pdrv = {
> },
> };
>
> -static int __init uio_pdrv_init(void)
> -{
> - return platform_driver_register(&uio_pdrv);
> -}
> -
> -static void __exit uio_pdrv_exit(void)
> -{
> - platform_driver_unregister(&uio_pdrv);
> -}
> -module_init(uio_pdrv_init);
> -module_exit(uio_pdrv_exit);
> +module_platform_driver(uio_pdrv);
>
> MODULE_AUTHOR("Uwe Kleine-Koenig");
> MODULE_DESCRIPTION("Userspace I/O platform driver");
> diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c
> index 25de302..b98371d 100644
> --- a/drivers/uio/uio_pdrv_genirq.c
> +++ b/drivers/uio/uio_pdrv_genirq.c
> @@ -273,18 +273,7 @@ static struct platform_driver uio_pdrv_genirq = {
> },
> };
>
> -static int __init uio_pdrv_genirq_init(void)
> -{
> - return platform_driver_register(&uio_pdrv_genirq);
> -}
> -
> -static void __exit uio_pdrv_genirq_exit(void)
> -{
> - platform_driver_unregister(&uio_pdrv_genirq);
> -}
> -
> -module_init(uio_pdrv_genirq_init);
> -module_exit(uio_pdrv_genirq_exit);
> +module_platform_driver(uio_pdrv_genirq);
>
> MODULE_AUTHOR("Magnus Damm");
> MODULE_DESCRIPTION("Userspace I/O platform driver with generic IRQ handling");
> diff --git a/drivers/uio/uio_pruss.c b/drivers/uio/uio_pruss.c
> index e67b566..33a7a27 100644
> --- a/drivers/uio/uio_pruss.c
> +++ b/drivers/uio/uio_pruss.c
> @@ -227,19 +227,7 @@ static struct platform_driver pruss_driver = {
> },
> };
>
> -static int __init pruss_init_module(void)
> -{
> - return platform_driver_register(&pruss_driver);
> -}
> -
> -module_init(pruss_init_module);
> -
> -static void __exit pruss_exit_module(void)
> -{
> - platform_driver_unregister(&pruss_driver);
> -}
> -
> -module_exit(pruss_exit_module);
> +module_platform_driver(pruss_driver);
>
> MODULE_LICENSE("GPL v2");
> MODULE_VERSION(DRV_VERSION);
> --
> 1.7.5.4
>
>
>
>
prev parent reply other threads:[~2011-11-28 20:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-26 7:18 [PATCH] uio: convert drivers/uio/* to use module_platform_driver() Axel Lin
2011-11-28 20:30 ` Hans J. Koch [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=20111128203006.GD2165@local \
--to=hjk@hansjkoch.de \
--cc=Uwe.Kleine-Koenig@digi.com \
--cc=amit.chatterjee@ti.com \
--cc=axel.lin@gmail.com \
--cc=damm@igel.co.jp \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pratheesh@ti.com \
/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