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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180425211625.apqz3aoegibwxpke@earth.universe>
Date:   Wed, 25 Apr 2018 23:16:25 +0200
From:   Sebastian Reichel <sre@...nel.org>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc:     linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        kernel-janitors@...r.kernel.org, linux-pm@...r.kernel.org
Subject: Re: [PATCH 41/61] power: supply: simplify getting .drvdata

Hi,

On Thu, Apr 19, 2018 at 04:06:11PM +0200, Wolfram Sang wrote:
> We should get drvdata from struct device directly. Going via
> platform_device is an unneeded step back and forth.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
> ---

Thanks, queued.

-- Sebastian

> 
> Build tested only. buildbot is happy. Please apply individually.
> 
>  drivers/power/supply/gpio-charger.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/power/supply/gpio-charger.c b/drivers/power/supply/gpio-charger.c
> index bd2468ca6b63..c3f2a9479468 100644
> --- a/drivers/power/supply/gpio-charger.c
> +++ b/drivers/power/supply/gpio-charger.c
> @@ -212,8 +212,7 @@ static int gpio_charger_suspend(struct device *dev)
>  
>  static int gpio_charger_resume(struct device *dev)
>  {
> -	struct platform_device *pdev = to_platform_device(dev);
> -	struct gpio_charger *gpio_charger = platform_get_drvdata(pdev);
> +	struct gpio_charger *gpio_charger = dev_get_drvdata(dev);
>  
>  	if (device_may_wakeup(dev) && gpio_charger->wakeup_enabled)
>  		disable_irq_wake(gpio_charger->irq);
> -- 
> 2.11.0
> 

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ