linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: leo.yan@linaro.org
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Jassi Brar <jassisinghbrar@gmail.com>,
	linux-kernel@vger.kernel.org,
	Kevin Wangtao <kevin.wangtao@hisilicon.com>,
	Kaihua Zhong <zhongkaihua@huawei.com>,
	Ruyi Wang <wangruyi@huawei.com>
Subject: Re: [PATCH v2 06/19] mailbox: hi3660: Use device-managed registration API
Date: Tue, 18 Dec 2018 17:16:07 +0800	[thread overview]
Message-ID: <20181218091607.GB1475@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <20181217150217.32435-7-thierry.reding@gmail.com>

On Mon, Dec 17, 2018 at 04:02:04PM +0100, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> Get rid of some boilerplate driver removal code by using the newly added
> device-managed registration API.

Tested-by: Leo Yan <leo.yan@linaro.org>

> Cc: Kevin Wangtao <kevin.wangtao@hisilicon.com>
> Cc: Kaihua Zhong <zhongkaihua@huawei.com>
> Cc: Ruyi Wang <wangruyi@huawei.com>
> Cc: Leo Yan <leo.yan@linaro.org>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/mailbox/hi3660-mailbox.c | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/drivers/mailbox/hi3660-mailbox.c b/drivers/mailbox/hi3660-mailbox.c
> index f9aed5d8f9f1..53f4bc2488c5 100644
> --- a/drivers/mailbox/hi3660-mailbox.c
> +++ b/drivers/mailbox/hi3660-mailbox.c
> @@ -265,7 +265,7 @@ static int hi3660_mbox_probe(struct platform_device *pdev)
>  	for (ch = 0; ch < MBOX_CHAN_MAX; ch++)
>  		chan[ch].con_priv = (void *)ch;
>  
> -	err = mbox_controller_register(&mbox->controller);
> +	err = devm_mbox_controller_register(dev, &mbox->controller);
>  	if (err) {
>  		dev_err(dev, "Failed to register mailbox %d\n", err);
>  		return err;
> @@ -276,17 +276,8 @@ static int hi3660_mbox_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int hi3660_mbox_remove(struct platform_device *pdev)
> -{
> -	struct hi3660_mbox *mbox = platform_get_drvdata(pdev);
> -
> -	mbox_controller_unregister(&mbox->controller);
> -	return 0;
> -}
> -
>  static struct platform_driver hi3660_mbox_driver = {
>  	.probe  = hi3660_mbox_probe,
> -	.remove = hi3660_mbox_remove,
>  	.driver = {
>  		.name = "hi3660-mbox",
>  		.of_match_table = hi3660_mbox_of_match,
> -- 
> 2.19.1
> 

  reply	other threads:[~2018-12-18  9:16 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-17 15:01 [PATCH v2 00/19] mailbox: Device-managed registration Thierry Reding
2018-12-17 15:01 ` [PATCH v2 01/19] mailbox: Add device-managed registration functions Thierry Reding
2018-12-17 18:15   ` Bjorn Andersson
2018-12-18 16:04   ` Sudeep Holla
2018-12-17 15:02 ` [PATCH v2 02/19] mailbox: arm-mhu: Use device-managed registration API Thierry Reding
2018-12-18 16:07   ` Sudeep Holla
2018-12-17 15:02 ` [PATCH v2 03/19] mailbox: bcm2835: " Thierry Reding
2018-12-18 19:24   ` Eric Anholt
2018-12-17 15:02 ` [PATCH v2 04/19] mailbox: bcm-flexrm: " Thierry Reding
2018-12-17 15:02 ` [PATCH v2 05/19] mailbox: bcm-pdc: " Thierry Reding
2018-12-17 15:02 ` [PATCH v2 06/19] mailbox: hi3660: " Thierry Reding
2018-12-18  9:16   ` leo.yan [this message]
2018-12-17 15:02 ` [PATCH v2 07/19] mailbox: hi6220: " Thierry Reding
2018-12-18  9:17   ` leo.yan
2018-12-17 15:02 ` [PATCH v2 08/19] mailbox: imx: " Thierry Reding
2018-12-17 15:31   ` Oleksij Rempel
2018-12-17 15:02 ` [PATCH v2 09/19] mailbox: altera: " Thierry Reding
2018-12-17 15:02 ` [PATCH v2 10/19] mailbox: sti: " Thierry Reding
2018-12-18  8:27   ` Lee Jones
2018-12-17 15:02 ` [PATCH v2 11/19] mailbox: xgene-slimpro: " Thierry Reding
2018-12-17 15:02 ` [PATCH v2 12/19] mailbox: mtk-cmdq: " Thierry Reding
2018-12-17 15:02 ` [PATCH v2 13/19] mailbox: mtk-cmdq: Remove needless devm_kfree() calls Thierry Reding
2018-12-17 15:02 ` [PATCH v2 14/19] mailbox: omap: Use device-managed registration API Thierry Reding
2018-12-18  0:10   ` kbuild test robot
2018-12-17 15:02 ` [PATCH v2 15/19] mailbox: platform-mhu: " Thierry Reding
2018-12-17 15:04   ` Neil Armstrong
2018-12-17 15:02 ` [PATCH v2 16/19] mailbox: qcom-apcs: " Thierry Reding
2018-12-17 18:16   ` Bjorn Andersson
2018-12-17 15:02 ` [PATCH v2 17/19] mailbox: rockchip: " Thierry Reding
2018-12-18  0:36   ` Caesar Wang
2018-12-17 15:02 ` [PATCH v2 18/19] mailbox: stm32-ipcc: " Thierry Reding
2018-12-18  8:26   ` Ludovic BARRE
2018-12-17 15:02 ` [PATCH v2 19/19] mailbox: ti-msgmgr: " Thierry Reding

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=20181218091607.GB1475@leoy-ThinkPad-X240s \
    --to=leo.yan@linaro.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=kevin.wangtao@hisilicon.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=wangruyi@huawei.com \
    --cc=zhongkaihua@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;
as well as URLs for NNTP newsgroup(s).