From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
Eric Miao <eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Haojian Zhuang
<haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] spi: use module_pci_driver
Date: Thu, 05 Apr 2012 10:19:16 -0700 [thread overview]
Message-ID: <20120405171916.134173E044B@localhost> (raw)
In-Reply-To: <1333549772.5856.3.camel@phoenix>
On Wed, 04 Apr 2012 22:29:32 +0800, Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> This patch converts the drivers in drivers/spi/* to use module_pci_driver()
> macro which makes the code smaller and a bit simpler.
>
> Signed-off-by: Axel Lin <axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Applied, thanks.
g.
> ---
> drivers/spi/spi-dw-pci.c | 13 +------------
> drivers/spi/spi-pxa2xx-pci.c | 12 +-----------
> 2 files changed, 2 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/spi/spi-dw-pci.c b/drivers/spi/spi-dw-pci.c
> index 14f7cc9..ff81abb 100644
> --- a/drivers/spi/spi-dw-pci.c
> +++ b/drivers/spi/spi-dw-pci.c
> @@ -164,18 +164,7 @@ static struct pci_driver dw_spi_driver = {
> .resume = spi_resume,
> };
>
> -static int __init mrst_spi_init(void)
> -{
> - return pci_register_driver(&dw_spi_driver);
> -}
> -
> -static void __exit mrst_spi_exit(void)
> -{
> - pci_unregister_driver(&dw_spi_driver);
> -}
> -
> -module_init(mrst_spi_init);
> -module_exit(mrst_spi_exit);
> +module_pci_driver(dw_spi_driver);
>
> MODULE_AUTHOR("Feng Tang <feng.tang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>");
> MODULE_DESCRIPTION("PCI interface driver for DW SPI Core");
> diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c
> index 3fb44af..9f6ba34 100644
> --- a/drivers/spi/spi-pxa2xx-pci.c
> +++ b/drivers/spi/spi-pxa2xx-pci.c
> @@ -164,17 +164,7 @@ static struct pci_driver ce4100_spi_driver = {
> .remove = __devexit_p(ce4100_spi_remove),
> };
>
> -static int __init ce4100_spi_init(void)
> -{
> - return pci_register_driver(&ce4100_spi_driver);
> -}
> -module_init(ce4100_spi_init);
> -
> -static void __exit ce4100_spi_exit(void)
> -{
> - pci_unregister_driver(&ce4100_spi_driver);
> -}
> -module_exit(ce4100_spi_exit);
> +module_pci_driver(ce4100_spi_driver);
>
> MODULE_DESCRIPTION("CE4100 PCI-SPI glue code for PXA's driver");
> MODULE_LICENSE("GPL v2");
> --
> 1.7.5.4
>
>
>
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
WARNING: multiple messages have this Message-ID (diff)
From: Grant Likely <grant.likely@secretlab.ca>
To: Axel Lin <axel.lin@gmail.com>, linux-kernel@vger.kernel.org
Cc: Eric Miao <eric.y.miao@gmail.com>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
spi-devel-general@lists.sourceforge.net
Subject: Re: [PATCH] spi: use module_pci_driver
Date: Thu, 05 Apr 2012 10:19:16 -0700 [thread overview]
Message-ID: <20120405171916.134173E044B@localhost> (raw)
In-Reply-To: <1333549772.5856.3.camel@phoenix>
On Wed, 04 Apr 2012 22:29:32 +0800, Axel Lin <axel.lin@gmail.com> wrote:
> This patch converts the drivers in drivers/spi/* to use module_pci_driver()
> macro which makes the code smaller and a bit simpler.
>
> Signed-off-by: Axel Lin <axel.lin@gmail.com>
Applied, thanks.
g.
> ---
> drivers/spi/spi-dw-pci.c | 13 +------------
> drivers/spi/spi-pxa2xx-pci.c | 12 +-----------
> 2 files changed, 2 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/spi/spi-dw-pci.c b/drivers/spi/spi-dw-pci.c
> index 14f7cc9..ff81abb 100644
> --- a/drivers/spi/spi-dw-pci.c
> +++ b/drivers/spi/spi-dw-pci.c
> @@ -164,18 +164,7 @@ static struct pci_driver dw_spi_driver = {
> .resume = spi_resume,
> };
>
> -static int __init mrst_spi_init(void)
> -{
> - return pci_register_driver(&dw_spi_driver);
> -}
> -
> -static void __exit mrst_spi_exit(void)
> -{
> - pci_unregister_driver(&dw_spi_driver);
> -}
> -
> -module_init(mrst_spi_init);
> -module_exit(mrst_spi_exit);
> +module_pci_driver(dw_spi_driver);
>
> MODULE_AUTHOR("Feng Tang <feng.tang@intel.com>");
> MODULE_DESCRIPTION("PCI interface driver for DW SPI Core");
> diff --git a/drivers/spi/spi-pxa2xx-pci.c b/drivers/spi/spi-pxa2xx-pci.c
> index 3fb44af..9f6ba34 100644
> --- a/drivers/spi/spi-pxa2xx-pci.c
> +++ b/drivers/spi/spi-pxa2xx-pci.c
> @@ -164,17 +164,7 @@ static struct pci_driver ce4100_spi_driver = {
> .remove = __devexit_p(ce4100_spi_remove),
> };
>
> -static int __init ce4100_spi_init(void)
> -{
> - return pci_register_driver(&ce4100_spi_driver);
> -}
> -module_init(ce4100_spi_init);
> -
> -static void __exit ce4100_spi_exit(void)
> -{
> - pci_unregister_driver(&ce4100_spi_driver);
> -}
> -module_exit(ce4100_spi_exit);
> +module_pci_driver(ce4100_spi_driver);
>
> MODULE_DESCRIPTION("CE4100 PCI-SPI glue code for PXA's driver");
> MODULE_LICENSE("GPL v2");
> --
> 1.7.5.4
>
>
>
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies,Ltd.
next prev parent reply other threads:[~2012-04-05 17:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-04 14:29 [PATCH] spi: use module_pci_driver Axel Lin
2012-04-05 17:19 ` Grant Likely [this message]
2012-04-05 17:19 ` Grant Likely
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=20120405171916.134173E044B@localhost \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=axel.lin-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=eric.y.miao-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=haojian.zhuang-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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 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.