Received: by 10.192.165.156 with SMTP id m28csp772470imm; Thu, 19 Apr 2018 07:20:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx491RK2bLdx5x2iQ5xnP+iEFMJfrHIcIM3MGoajuu4zoquK2ST52hBuUhD8AzcWsLXRtLBqh X-Received: by 10.98.159.20 with SMTP id g20mr6051412pfe.75.1524147621780; Thu, 19 Apr 2018 07:20:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147621; cv=none; d=google.com; s=arc-20160816; b=fT6hOJVzuiE9f7YBYQNcF4oE2ApzlLYOEftcphy8cbOOP8p9GdrK/D6QyAMwjlhy3m MpEclQNdZbWv8WBSxd4xfdyBZ2BQqfb8bv8w3x8m4iNsuWBrY8AzUURrODE5IZYSTjCs X38L17gc/DJgf0qO+GF6Wp4FyN7aU35Aoxdtt9nftIxTsKhslNsXm4dJb0uuFAEiG05F 5KwwRX5j0nfp92jTss9EmxfX4m4sdgIu5ddJzH0ns5iFrv6LtIiFTRgIUnJpGeLIf6vM eTdANcCK86VPmygexaLkRuYP82z23B4ZkdofkQSXDzp0clPGvFxCl+loRM2lMNPpeg2l pFEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=+618pXdnBa1oXfreFJ/k1HwGEP+VfGpkLV92AwmwXks=; b=TnKsop/6NxwKJ2mQ2AjvBsKwgtxcoiEzyXO+b2NpQBju6nK6+/hcNdioiKiHHLO6Qt hfRrKaC2c0H3L3YQmsXU120U0IhiofIDMRFJtXbtAJaRKJJg3Gaq0Uv71HVoLr3pcg4j zpyr/WTZEPzwGj4jyH7ib/X9354RilFT+IXMiSektUb6IV8QT0qIpndFU2wi1+qqP+2T ZP9sxxjGxQp7jLA1PBlX7TnlUGtpiQJSxfMPFS1opzObH+vzLHNMXQs1MuUHRb3WLt6R JJsZutpqaH3Cs3FEt7KpORLLOhSf1WasC7ukDnOItjNBrXU+dF8N0xfbMothJaYxUxYb kCAA== 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 j123si361424pfd.207.2018.04.19.07.20.08; Thu, 19 Apr 2018 07:20:21 -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 S1753058AbeDSOTE (ORCPT + 99 others); Thu, 19 Apr 2018 10:19:04 -0400 Received: from sauhun.de ([88.99.104.3]:45350 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753411AbeDSOHC (ORCPT ); Thu, 19 Apr 2018 10:07:02 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 602233139C0; Thu, 19 Apr 2018 16:07:01 +0200 (CEST) From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, kernel-janitors@vger.kernel.org, Wolfram Sang , Kyungmin Park , Boris Brezillon , Richard Weinberger , David Woodhouse , Brian Norris , Marek Vasut , linux-mtd@lists.infradead.org Subject: [PATCH 30/61] mtd: nand: onenand: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:06:00 +0200 Message-Id: <20180419140641.27926-31-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> References: <20180419140641.27926-1-wsa+renesas@sang-engineering.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang --- 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); -- 2.11.0