From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Chunyan Zhang <zhang.lyra@gmail.com>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
Baolin Wang <baolin.wang7@gmail.com>,
linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org,
Orson Zhai <orsonzhai@gmail.com>,
Chunyan Zhang <chunyan.zhang@unisoc.com>
Subject: Re: [PATCH v2 2/2] hwspinlock: sprd: use module_platform_driver() instead postcore initcall
Date: Mon, 2 Nov 2020 18:40:30 -0600 [thread overview]
Message-ID: <20201103004030.GC223412@builder.lan> (raw)
In-Reply-To: <20201030034654.15775-3-zhang.lyra@gmail.com>
On Thu 29 Oct 22:46 CDT 2020, Chunyan Zhang wrote:
> From: Chunyan Zhang <chunyan.zhang@unisoc.com>
>
> The hardware spinlock devices are defined in the DT, there's no need for
> init calls order, remove boilerplate code by using module_platform_driver.
>
> Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
Applied this patch with Baolin's r-b.
Thank you,
Bjorn
> ---
> drivers/hwspinlock/sprd_hwspinlock.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/hwspinlock/sprd_hwspinlock.c b/drivers/hwspinlock/sprd_hwspinlock.c
> index 4c63e2546064..19d1924044e5 100644
> --- a/drivers/hwspinlock/sprd_hwspinlock.c
> +++ b/drivers/hwspinlock/sprd_hwspinlock.c
> @@ -151,18 +151,7 @@ static struct platform_driver sprd_hwspinlock_driver = {
> .of_match_table = of_match_ptr(sprd_hwspinlock_of_match),
> },
> };
> -
> -static int __init sprd_hwspinlock_init(void)
> -{
> - return platform_driver_register(&sprd_hwspinlock_driver);
> -}
> -postcore_initcall(sprd_hwspinlock_init);
> -
> -static void __exit sprd_hwspinlock_exit(void)
> -{
> - platform_driver_unregister(&sprd_hwspinlock_driver);
> -}
> -module_exit(sprd_hwspinlock_exit);
> +module_platform_driver(sprd_hwspinlock_driver);
>
> MODULE_LICENSE("GPL v2");
> MODULE_DESCRIPTION("Hardware spinlock driver for Spreadtrum");
> --
> 2.20.1
>
prev parent reply other threads:[~2020-11-03 0:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-30 3:46 [PATCH v2 0/2] fixes and improvement for sprd hwspinlock Chunyan Zhang
2020-10-30 3:46 ` [PATCH v2 1/2] hwspinlock: sprd: fixed warning of unused variable 'sprd_hwspinlock_of_match' Chunyan Zhang
[not found] ` <CADBw62oQj+K_-nyoZyMJSQ6VaqcNHbX9gbyLEzV9+Od1cVmC5A@mail.gmail.com>
2020-11-02 23:58 ` Bjorn Andersson
2020-11-03 2:00 ` Chunyan Zhang
2020-10-30 3:46 ` [PATCH v2 2/2] hwspinlock: sprd: use module_platform_driver() instead postcore initcall Chunyan Zhang
2020-11-03 0:40 ` Bjorn Andersson [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=20201103004030.GC223412@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=baolin.wang7@gmail.com \
--cc=chunyan.zhang@unisoc.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=ohad@wizery.com \
--cc=orsonzhai@gmail.com \
--cc=zhang.lyra@gmail.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 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.