From: Borislav Petkov <bp@alien8.de>
To: Liu Shixin <liushixin2@huawei.com>
Cc: Tony Luck <tony.luck@intel.com>, Robert Richter <rric@kernel.org>,
linux-aspeed@lists.ozlabs.org, Andrew Jeffery <andrew@aj.id.au>,
linux-kernel@vger.kernel.org, James Morse <james.morse@arm.com>,
Joel Stanley <joel@jms.id.au>,
Stefan Schaeckeler <sschaeck@cisco.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-arm-kernel@lists.infradead.org, linux-edac@vger.kernel.org
Subject: Re: [PATCH -next] EDAC/aspeed: use module_platform_driver to simplify the code
Date: Wed, 16 Sep 2020 19:22:38 +0200 [thread overview]
Message-ID: <20200916172238.GQ2643@zn.tnic> (raw)
In-Reply-To: <20200914065358.3726216-1-liushixin2@huawei.com>
On Mon, Sep 14, 2020 at 02:53:58PM +0800, Liu Shixin wrote:
> module_platform_driver() makes the code simpler by eliminating
> boilerplate code.
>
> Signed-off-by: Liu Shixin <liushixin2@huawei.com>
> ---
> drivers/edac/aspeed_edac.c | 18 +-----------------
> 1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/drivers/edac/aspeed_edac.c b/drivers/edac/aspeed_edac.c
> index fbec28dc661d..fde809efc520 100644
> --- a/drivers/edac/aspeed_edac.c
> +++ b/drivers/edac/aspeed_edac.c
> @@ -388,23 +388,7 @@ static struct platform_driver aspeed_driver = {
> .probe = aspeed_probe,
> .remove = aspeed_remove
> };
> -
> -
> -static int __init aspeed_init(void)
> -{
> - return platform_driver_register(&aspeed_driver);
> -}
> -
> -
> -static void __exit aspeed_exit(void)
> -{
> - platform_driver_unregister(&aspeed_driver);
> -}
> -
> -
> -module_init(aspeed_init);
> -module_exit(aspeed_exit);
> -
> +module_platform_driver(aspeed_driver);
>
> MODULE_LICENSE("GPL");
> MODULE_AUTHOR("Stefan Schaeckeler <sschaeck@cisco.com>");
> --
Applied, thanks.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2020-09-16 17:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-14 6:53 [PATCH -next] EDAC/aspeed: use module_platform_driver to simplify the code Liu Shixin
2020-09-14 6:38 ` Joel Stanley
2020-09-16 17:22 ` Borislav Petkov [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=20200916172238.GQ2643@zn.tnic \
--to=bp@alien8.de \
--cc=andrew@aj.id.au \
--cc=james.morse@arm.com \
--cc=joel@jms.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liushixin2@huawei.com \
--cc=mchehab@kernel.org \
--cc=rric@kernel.org \
--cc=sschaeck@cisco.com \
--cc=tony.luck@intel.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