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: <20180422192921.61a6b28b@bbrezillon>
Date:   Sun, 22 Apr 2018 19:29:21 +0200
From:   Boris Brezillon <boris.brezillon@...tlin.com>
To:     Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc:     linux-kernel@...r.kernel.org, Richard Weinberger <richard@....at>,
        kernel-janitors@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
        Kyungmin Park <kyungmin.park@...sung.com>,
        linux-mtd@...ts.infradead.org,
        Brian Norris <computersforpeace@...il.com>,
        David Woodhouse <dwmw2@...radead.org>,
        Marek Vasut <marek.vasut@...il.com>
Subject: Re: [PATCH 30/61] mtd: nand: onenand: simplify getting .drvdata

On Thu, 19 Apr 2018 16:06:00 +0200
Wolfram Sang <wsa+renesas@...g-engineering.com> 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>

Applied to nand/next.

Thanks,

Boris

> ---
> 
> Build tested only. buildbot is happy. Please apply individually.
> 
>  drivers/mtd/nand/onenand/samsung.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/mtd/nand/onenand/samsung.c b/drivers/mtd/nand/onenand/samsung.c
> index 2e9d076e445a..4cce4c0311ca 100644
> --- a/drivers/mtd/nand/onenand/samsung.c
> +++ b/drivers/mtd/nand/onenand/samsung.c
> @@ -958,8 +958,7 @@ static int s3c_onenand_remove(struct platform_device *pdev)
>  
>  static int s3c_pm_ops_suspend(struct device *dev)
>  {
> -	struct platform_device *pdev = to_platform_device(dev);
> -	struct mtd_info *mtd = platform_get_drvdata(pdev);
> +	struct mtd_info *mtd = dev_get_drvdata(dev);
>  	struct onenand_chip *this = mtd->priv;
>  
>  	this->wait(mtd, FL_PM_SUSPENDED);
> @@ -968,8 +967,7 @@ static int s3c_pm_ops_suspend(struct device *dev)
>  
>  static  int s3c_pm_ops_resume(struct device *dev)
>  {
> -	struct platform_device *pdev = to_platform_device(dev);
> -	struct mtd_info *mtd = platform_get_drvdata(pdev);
> +	struct mtd_info *mtd = dev_get_drvdata(dev);
>  	struct onenand_chip *this = mtd->priv;
>  
>  	this->unlock_all(mtd);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ