Received: by 10.192.165.148 with SMTP id m20csp2599725imm; Sun, 22 Apr 2018 10:30:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/6RQbOyI5a5mqE+h+y9KFJ7oHWr5Jx9AOhBoiqppEiiz1OoYXxxmmHlIKfndVi7nDNmZ72 X-Received: by 2002:a17:902:7d85:: with SMTP id a5-v6mr17968621plm.102.1524418258573; Sun, 22 Apr 2018 10:30:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524418258; cv=none; d=google.com; s=arc-20160816; b=W3TSHtOoOpKvV6jtzT5o0j6gPwM+l0Hnz2PQtsIfLLMNClbiOWDNgo4nXLtzZb8EUA GJ03e5S4yBVaJy5A4jesnj4JMqfEs73ScTMHq7rO3rP9qJHQBTHaAW4H1sRjYoQP5TzL asnT+d+N5QCzmIxMsk4mBhqF4IP0sUfpGmVPzqDFF1+8vkIo1qJKl60EuqPbCzZD9Ukc gQkkOVTHLyjN/D3wSCva9J6JzjJqvEJb3KFIVgySMO5hdMLl6AWCXOjJ4fkf8LD0WdOb zW7uA2RfeQOvnfcXD45piTsZUuP35ukPYkbRHKIrFKDaD1J/inZ/yABrzLhhHDzFP5Uy BdoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :arc-authentication-results; bh=kU4eYi3NHmSPsJA3iAW171V2wr8ZZY68xdq5UJwTVwU=; b=bBdUIH14Mw2U6me35AJjwA08hm6EtSur2Mt3HNUjuUA0V697BYYYVhnzvtKANOhBT3 TClVDPld+ui4isezTGHne6+92vvoPFd7x1KrakiInk97A4dG8VICsihh1PNTlz1SxqNw 61JS0bPavUylXsAPRCX+uViK/S/j1ElbuRvNrMQClHcapmS8CYCMFnoMAPiIqyhp+mWM +QzUI9ikEEzcO9PPrt5hh6q7Iy7x1rj23F1yhOWY5ZZfQhpUA1rath6v37EDyeYu+ea1 Ei/+ojeTC+o1Dh2Hs7yMv7OXKP/sQyUDsAI6wNiDJO2c2iukDFvN9BcwKMUYWeHMEKco qpVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v14si9391034pfm.198.2018.04.22.10.30.44; Sun, 22 Apr 2018 10:30:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753444AbeDVR3i (ORCPT + 99 others); Sun, 22 Apr 2018 13:29:38 -0400 Received: from mail.bootlin.com ([62.4.15.54]:46750 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751564AbeDVR3f (ORCPT ); Sun, 22 Apr 2018 13:29:35 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id DF057206A0; Sun, 22 Apr 2018 19:29:32 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from bbrezillon (unknown [195.53.49.241]) by mail.bootlin.com (Postfix) with ESMTPSA id 563722076C; Sun, 22 Apr 2018 19:29:22 +0200 (CEST) Date: Sun, 22 Apr 2018 19:29:21 +0200 From: Boris Brezillon To: Wolfram Sang Cc: linux-kernel@vger.kernel.org, Richard Weinberger , kernel-janitors@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Kyungmin Park , linux-mtd@lists.infradead.org, Brian Norris , David Woodhouse , Marek Vasut Subject: Re: [PATCH 30/61] mtd: nand: onenand: simplify getting .drvdata Message-ID: <20180422192921.61a6b28b@bbrezillon> In-Reply-To: <20180419140641.27926-31-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> <20180419140641.27926-31-wsa+renesas@sang-engineering.com> X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 19 Apr 2018 16:06:00 +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 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);