lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181218091730.GC1475@leoy-ThinkPad-X240s>
Date:   Tue, 18 Dec 2018 17:17:30 +0800
From:   leo.yan@...aro.org
To:     Thierry Reding <thierry.reding@...il.com>
Cc:     Jassi Brar <jassisinghbrar@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 07/19] mailbox: hi6220: Use device-managed
 registration API

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

Reviewed-by: Leo Yan <leo.yan@...aro.org>

> Cc: Leo Yan <leo.yan@...aro.org>
> Signed-off-by: Thierry Reding <treding@...dia.com>
> ---
>  drivers/mailbox/hi6220-mailbox.c | 11 +----------
>  1 file changed, 1 insertion(+), 10 deletions(-)
> 
> diff --git a/drivers/mailbox/hi6220-mailbox.c b/drivers/mailbox/hi6220-mailbox.c
> index 4fa9803cd204..c32cbfaf223a 100644
> --- a/drivers/mailbox/hi6220-mailbox.c
> +++ b/drivers/mailbox/hi6220-mailbox.c
> @@ -349,7 +349,7 @@ static int hi6220_mbox_probe(struct platform_device *pdev)
>  		mbox->controller.txpoll_period = 5;
>  	}
>  
> -	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;
> @@ -360,14 +360,6 @@ static int hi6220_mbox_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int hi6220_mbox_remove(struct platform_device *pdev)
> -{
> -	struct hi6220_mbox *mbox = platform_get_drvdata(pdev);
> -
> -	mbox_controller_unregister(&mbox->controller);
> -	return 0;
> -}
> -
>  static struct platform_driver hi6220_mbox_driver = {
>  	.driver = {
>  		.name = "hi6220-mbox",
> @@ -375,7 +367,6 @@ static struct platform_driver hi6220_mbox_driver = {
>  		.of_match_table = hi6220_mbox_of_match,
>  	},
>  	.probe	= hi6220_mbox_probe,
> -	.remove	= hi6220_mbox_remove,
>  };
>  
>  static int __init hi6220_mbox_init(void)
> -- 
> 2.19.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ