mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Samuel Ortiz <sameo@linux.intel.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mfd: syscon: Use module_platform_driver()
Date: Mon, 16 Jun 2014 10:14:23 +0100	[thread overview]
Message-ID: <20140616091423.GJ14323@lee--X1> (raw)
In-Reply-To: <1402324454-15872-1-git-send-email-wangkefeng.wang@huawei.com>

On Mon, 09 Jun 2014, Kefeng Wang wrote:

> Convert to module_platform_drive() to eliminate boilerplate code.
> 
> Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
> ---
>  drivers/mfd/syscon.c |   12 +-----------
>  1 files changed, 1 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c
> index ca15878..6c2c874 100644
> --- a/drivers/mfd/syscon.c
> +++ b/drivers/mfd/syscon.c
> @@ -173,17 +173,7 @@ static struct platform_driver syscon_driver = {
>  	.id_table	= syscon_ids,
>  };
>  
> -static int __init syscon_init(void)
> -{
> -	return platform_driver_register(&syscon_driver);
> -}
> -postcore_initcall(syscon_init);
> -
> -static void __exit syscon_exit(void)
> -{
> -	platform_driver_unregister(&syscon_driver);
> -}
> -module_exit(syscon_exit);
> +module_platform_driver(syscon_driver)

You have changed the initialisation semantics of quite an important
driver here.  Initialising with postcore_initcall() is not so boiler
plate and swapping it out for a module_init() as you're doing with
this patch will probably break some systems.

>  MODULE_AUTHOR("Dong Aisheng <dong.aisheng@linaro.org>");
>  MODULE_DESCRIPTION("System Control driver");

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

      reply	other threads:[~2014-06-16  9:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-09 14:34 Kefeng Wang
2014-06-16  9:14 ` Lee Jones [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=20140616091423.GJ14323@lee--X1 \
    --to=lee.jones@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sameo@linux.intel.com \
    --cc=wangkefeng.wang@huawei.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

all inboxes | Powered by JetHome®