From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Ezequiel Garcia
<ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: shadi-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org,
Ezequiel Garcia
<ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Subject: Re: [PATCH] spi: orion: Use module_platform_driver()
Date: Tue, 05 Feb 2013 14:39:55 +0000 [thread overview]
Message-ID: <20130205143955.6A0913E1265@localhost> (raw)
In-Reply-To: <1359980786-4606-1-git-send-email-ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
On Mon, 4 Feb 2013 09:26:26 -0300, Ezequiel Garcia <ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> wrote:
> This patch reduces and simplifies initalization code by
> using module_platform_driver().
> With this change it's necessary to remove the __init annotation
> to avoid section mismatch warnings.
>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
Applied, thanks.
g.
> ---
> drivers/spi/spi-orion.c | 15 +++------------
> 1 files changed, 3 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
> index b7e7182..d8cbf20 100644
> --- a/drivers/spi/spi-orion.c
> +++ b/drivers/spi/spi-orion.c
> @@ -396,7 +396,7 @@ static int orion_spi_setup(struct spi_device *spi)
> return 0;
> }
>
> -static int __init orion_spi_probe(struct platform_device *pdev)
> +static int orion_spi_probe(struct platform_device *pdev)
> {
> struct spi_master *master;
> struct orion_spi *spi;
> @@ -513,20 +513,11 @@ static struct platform_driver orion_spi_driver = {
> .owner = THIS_MODULE,
> .of_match_table = of_match_ptr(orion_spi_of_match_table),
> },
> + .probe = orion_spi_probe,
> .remove = __exit_p(orion_spi_remove),
> };
>
> -static int __init orion_spi_init(void)
> -{
> - return platform_driver_probe(&orion_spi_driver, orion_spi_probe);
> -}
> -module_init(orion_spi_init);
> -
> -static void __exit orion_spi_exit(void)
> -{
> - platform_driver_unregister(&orion_spi_driver);
> -}
> -module_exit(orion_spi_exit);
> +module_platform_driver(orion_spi_driver);
>
> MODULE_DESCRIPTION("Orion SPI driver");
> MODULE_AUTHOR("Shadi Ammouri <shadi-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>");
> --
> 1.7.8.6
>
--
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.
------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
prev parent reply other threads:[~2013-02-05 14:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-04 12:26 [PATCH] spi: orion: Use module_platform_driver() Ezequiel Garcia
[not found] ` <1359980786-4606-1-git-send-email-ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>
2013-02-05 14:39 ` Grant Likely [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=20130205143955.6A0913E1265@localhost \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=shadi-eYqpPyKDWXRBDgjK7y7TUQ@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.