Received: by 10.192.165.156 with SMTP id m28csp768525imm; Thu, 19 Apr 2018 07:16:51 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/ZeafslvtcdlGQOfnRE46xHsLqWfHqsgbfoHjQ4VmKhmZzsEpebqVNY6v+QhIug3F4GY3h X-Received: by 10.98.157.90 with SMTP id i87mr1205297pfd.190.1524147410949; Thu, 19 Apr 2018 07:16:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147410; cv=none; d=google.com; s=arc-20160816; b=XGKQkwbYDftuWISKmtBhkIt/p2wOpYPr5b21kkO/b7wR2jD8urQBnJlVRRBM53mT60 kQZT8CzrU9Z8Sr6lt9iQPhfwUDytj/eCPL066SdxUn9hwMKnPIBTIq39DX9FLgdFqaMU DWsPinSG33mivwz5wr60XvLtFDwq+JylzMfh6w3H5xzYMHONfB+N7WlmjmMPcg+WGBVS IlHRfGm4hgZNy3mbSBGk1wchPx+OsoEPVQR4Of5egLgkNmCa+1savxJqK07bo/9jTK3o n/MPgeUvnD1nY3JYG+xMZjJBezVYLCSRJYCBpfgWNgPe2yxBYMubh79HGLEo+JBhMTLm m1fA== 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=4yPYrhdWAGAeTWin7HPpNeAT7jwNz5aWgvqQZOnAcfg=; b=evgdvINGbi39bks49jcJnyhPt7gk/uEOg3XXlyNexPra2XqlcbdGU2K2M9qYyOBRLQ +aE7iXI5EdYfDvr9gwyRlKRhU55bi7znp2W03anDCUU0nPs1C4Ao/z0Tg6D0t7ZpkkjJ i0MUMB58ZjhRv6Zbcjb2i21z8ybyUZ+oQFhxynkwl5F1we8ht3oS8AoVnkOrYTdLOPuO DGh22l4YM8NVDDuagN4fy82FnZNATj4drOmGuQVno8paeLXzieV5gb5qzZghRSVzpvfz GJ2q5PN+YL0bVRqnDMzSsHsIzoBM4TGMJM7MPTwrvri5F1P1Bi6+7qaXVwPFLYQGov4X s4vA== 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 a6si3148953pgn.631.2018.04.19.07.16.37; Thu, 19 Apr 2018 07:16:50 -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 S1753637AbeDSOPf (ORCPT + 99 others); Thu, 19 Apr 2018 10:15:35 -0400 Received: from sauhun.de ([88.99.104.3]:45416 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753503AbeDSOHG (ORCPT ); Thu, 19 Apr 2018 10:07:06 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 6AA9C3139CE; Thu, 19 Apr 2018 16:07:05 +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 , Mika Westerberg , Heikki Krogerus , Linus Walleij , linux-gpio@vger.kernel.org Subject: [PATCH 39/61] pinctrl: intel: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:06:09 +0200 Message-Id: <20180419140641.27926-40-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/pinctrl/intel/pinctrl-baytrail.c | 6 ++---- drivers/pinctrl/intel/pinctrl-cherryview.c | 6 ++---- drivers/pinctrl/intel/pinctrl-intel.c | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c b/drivers/pinctrl/intel/pinctrl-baytrail.c index 6b52ea1440a6..71dadf8081af 100644 --- a/drivers/pinctrl/intel/pinctrl-baytrail.c +++ b/drivers/pinctrl/intel/pinctrl-baytrail.c @@ -1848,8 +1848,7 @@ static int byt_pinctrl_probe(struct platform_device *pdev) #ifdef CONFIG_PM_SLEEP static int byt_gpio_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct byt_gpio *vg = platform_get_drvdata(pdev); + struct byt_gpio *vg = dev_get_drvdata(dev); int i; for (i = 0; i < vg->soc_data->npins; i++) { @@ -1877,8 +1876,7 @@ static int byt_gpio_suspend(struct device *dev) static int byt_gpio_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct byt_gpio *vg = platform_get_drvdata(pdev); + struct byt_gpio *vg = dev_get_drvdata(dev); int i; for (i = 0; i < vg->soc_data->npins; i++) { diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c index b1ae1618fefe..dd9b2554548f 100644 --- a/drivers/pinctrl/intel/pinctrl-cherryview.c +++ b/drivers/pinctrl/intel/pinctrl-cherryview.c @@ -1752,8 +1752,7 @@ static int chv_pinctrl_remove(struct platform_device *pdev) #ifdef CONFIG_PM_SLEEP static int chv_pinctrl_suspend_noirq(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct chv_pinctrl *pctrl = platform_get_drvdata(pdev); + struct chv_pinctrl *pctrl = dev_get_drvdata(dev); unsigned long flags; int i; @@ -1786,8 +1785,7 @@ static int chv_pinctrl_suspend_noirq(struct device *dev) static int chv_pinctrl_resume_noirq(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct chv_pinctrl *pctrl = platform_get_drvdata(pdev); + struct chv_pinctrl *pctrl = dev_get_drvdata(dev); unsigned long flags; int i; diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index 1e24a6b8a64e..04a052292619 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -1409,8 +1409,7 @@ static bool intel_pinctrl_should_save(struct intel_pinctrl *pctrl, unsigned pin) int intel_pinctrl_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct intel_pinctrl *pctrl = platform_get_drvdata(pdev); + struct intel_pinctrl *pctrl = dev_get_drvdata(dev); struct intel_community_context *communities; struct intel_pad_context *pads; int i; @@ -1471,8 +1470,7 @@ static void intel_gpio_irq_init(struct intel_pinctrl *pctrl) int intel_pinctrl_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct intel_pinctrl *pctrl = platform_get_drvdata(pdev); + struct intel_pinctrl *pctrl = dev_get_drvdata(dev); const struct intel_community_context *communities; const struct intel_pad_context *pads; int i; -- 2.11.0