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: <fba6daf5-270f-fc91-2900-02662b71896d@baylibre.com>
Date:   Mon, 17 Dec 2018 16:04:14 +0100
From:   Neil Armstrong <narmstrong@...libre.com>
To:     Thierry Reding <thierry.reding@...il.com>,
        Jassi Brar <jassisinghbrar@...il.com>
Cc:     linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 15/19] mailbox: platform-mhu: Use device-managed
 registration API

On 17/12/2018 16:02, 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.
> 
> Cc: Neil Armstrong <narmstrong@...libre.com>
> Signed-off-by: Thierry Reding <treding@...dia.com>
> ---
>  drivers/mailbox/platform_mhu.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/drivers/mailbox/platform_mhu.c b/drivers/mailbox/platform_mhu.c
> index e13201a5cec6..d2502c5be130 100644
> --- a/drivers/mailbox/platform_mhu.c
> +++ b/drivers/mailbox/platform_mhu.c
> @@ -163,7 +163,7 @@ static int platform_mhu_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, mhu);
>  
> -	err = mbox_controller_register(&mhu->mbox);
> +	err = devm_mbox_controller_register(dev, &mhu->mbox);
>  	if (err) {
>  		dev_err(dev, "Failed to register mailboxes %d\n", err);
>  		return err;
> @@ -173,15 +173,6 @@ static int platform_mhu_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> -static int platform_mhu_remove(struct platform_device *pdev)
> -{
> -	struct platform_mhu *mhu = platform_get_drvdata(pdev);
> -
> -	mbox_controller_unregister(&mhu->mbox);
> -
> -	return 0;
> -}
> -
>  static const struct of_device_id platform_mhu_dt_ids[] = {
>  	{ .compatible = "amlogic,meson-gxbb-mhu", },
>  	{ /* sentinel */ },
> @@ -190,7 +181,6 @@ MODULE_DEVICE_TABLE(of, platform_mhu_dt_ids);
>  
>  static struct platform_driver platform_mhu_driver = {
>  	.probe	= platform_mhu_probe,
> -	.remove	= platform_mhu_remove,
>  	.driver = {
>  		.name = "platform-mhu",
>  		.of_match_table	= platform_mhu_dt_ids,
> 

Acked-by: Neil Armstrong <narmstrong@...libre.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ