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: <2ca7430db77ca2924cb6f4b99e858f155d261a18.camel@suse.de>
Date:   Mon, 26 Oct 2020 15:31:47 +0100
From:   Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
To:     u.kleine-koenig@...gutronix.de, linux-kernel@...r.kernel.org
Cc:     f.fainelli@...il.com, linux-pwm@...r.kernel.org,
        bcm-kernel-feedback-list@...adcom.com,
        linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
        wahrenst@....net, linux-input@...r.kernel.org,
        dmitry.torokhov@...il.com, gregkh@...uxfoundation.org,
        devel@...verdev.osuosl.org, p.zabel@...gutronix.de,
        linux-gpio@...r.kernel.org, linus.walleij@...aro.org,
        linux-clk@...r.kernel.org, sboyd@...nel.org,
        linux-rpi-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 05/10] soc: bcm: raspberrypi-power: Release firmware
 handle on unbind

On Thu, 2020-10-22 at 17:58 +0200, Nicolas Saenz Julienne wrote:
> Upon unbinding the device make sure we release RPi's firmware interface.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@...e.de>
> ---
>  drivers/soc/bcm/raspberrypi-power.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/soc/bcm/raspberrypi-power.c b/drivers/soc/bcm/raspberrypi-power.c
> index 5d1aacdd84ef..a0b38db5886c 100644
> --- a/drivers/soc/bcm/raspberrypi-power.c
> +++ b/drivers/soc/bcm/raspberrypi-power.c
> @@ -225,6 +225,20 @@ static int rpi_power_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +static int rpi_power_remove(struct platform_device *pdev)
> +{
> +	struct rpi_power_domains *rpi_domains = platform_get_drvdata(pdev);
> +
> +	of_genpd_del_provider(dev->of_node);
> +
> +	for (i = 0; i < RPI_POWER_DOMAIN_COUNT; i++)
> +		pm_genpd_remove(&rpi_domains->domains[i].base);
> +
> +	rpi_firmware_put(rpi_domaina->fw);

I Just realised I failed to squash a fix for this patch, so this will not
build. Sorry for that.

Regards,
Nicolas

> +
> +	return 0;
> +}
> +
>  static const struct of_device_id rpi_power_of_match[] = {
>  	{ .compatible = "raspberrypi,bcm2835-power", },
>  	{},
> @@ -237,6 +251,7 @@ static struct platform_driver rpi_power_driver = {
>  		.of_match_table = rpi_power_of_match,
>  	},
>  	.probe		= rpi_power_probe,
> +	.remove		= rpi_power_remove,
>  };
>  builtin_platform_driver(rpi_power_driver);
>  


Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ