Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1833136pxb; Mon, 20 Sep 2021 06:25:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzlmwnPf9NAnwEtk/q9f9CKr1TDqneLH8c5MJ1y1IKd1PFINaaMrjap92AJB5JSVuNQav+A X-Received: by 2002:a05:6638:bc1:: with SMTP id g1mr13757390jad.86.1632144344979; Mon, 20 Sep 2021 06:25:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632144344; cv=none; d=google.com; s=arc-20160816; b=GXmWXpbjodX/MLnjzCFZhrRsM6oS1qdYtsSkHRwVAntmDuyMVAN0thIY3qyQfieola X/GSp33Y2pcN20QSLxC6HR0HQCnveZ8GDY8aJmB2NJSRvTRCUrF4G7CLi9ySn/HrTTRn z+y4L2O2iOUePEBWsooFrRuRuGbUSYxfvBt8bQRtSwyao44Vl3+1h8pJuaC48zEjV1i6 H9oYZfKA5St8GbYcG0OiQL9DjZEC7P+VxdXR7uRKuvtyjAx+Ec0DZZu0OGAAJu5ee2HJ H5NoE+tZt/wMzKzgNaZMSXFLAVmUn+ZZ+0IEPGDN+J/TlW2sisFTVT93VZv+inJZI8Mn zB9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=O5NE9SK7TyT91lElMFQZol/p7VJPfKgYr+AzRl4FzJo=; b=ci50I358NClre95nin2GnsIBBl9KtOyqDDuwS401ntlrzBSyfy+j2aBPGhKtr4AOKh VFNBdyxUvHT3HIzH1qterlgaF7loZ59VcOeQEIJn5M+8yBLJbQYjV9ztvt3mpyv0pVey RjunFPuwBtXBNPryrWNg2JvtJ8UuDWF1ETTB3hnSGw7sjDrFcj1CrnETzPBx/CZwxdup jyIxorXK6wBjpL8OkjndogwRw+URvLC/tc1DqDjjOa+R7LR5TGN7QSl64XjkiGr45t0B Z5A7b6I9hfhHSjOxDU0we1I/sZTozai3P8HW3f7r+/HLuy6I+jqXGAO+9GLFVUqeTkjN n6VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=AxanZlvK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b7si7389239ilv.56.2021.09.20.06.25.30; Mon, 20 Sep 2021 06:25:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=AxanZlvK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236076AbhITJHn (ORCPT + 99 others); Mon, 20 Sep 2021 05:07:43 -0400 Received: from www.zeus03.de ([194.117.254.33]:54238 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236092AbhITJHI (ORCPT ); Mon, 20 Sep 2021 05:07:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=k1; bh=BLeN3aWGvmhC6O T7d18ejB5diYjwZjYQYq05PqGUqXk=; b=AxanZlvKFbWYt0LlZfzjao09kXgYzl yy30P2Bfey4RoDaqY7/2Jm5wpzdC5zsxzDdA9KD+5UXepw6CMiA424XdMF8m5awq 7aYYpdxroaOen++2WBcT5sP7uDq7ucZbXmg8CCmk/KXaLi5MGLHYCF3ThDzRtiOe pE5btDya/RTpk= Received: (qmail 2412655 invoked from network); 20 Sep 2021 11:05:24 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 20 Sep 2021 11:05:24 +0200 X-UD-Smtp-Session: l3s3148p1@37PYlGnMDIsgAwDPXwlxANIWpbLKE1Uh From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Shubhrajyoti Datta , Srinivas Neeli , Michal Simek , Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 3/9] gpio: xilinx: simplify getting .driver_data Date: Mon, 20 Sep 2021 11:05:15 +0200 Message-Id: <20210920090522.23784-4-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> References: <20210920090522.23784-1-wsa+renesas@sang-engineering.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We should get 'driver_data' 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. drivers/gpio/gpio-xilinx.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c index a1b66338d077..b6d3a57e27ed 100644 --- a/drivers/gpio/gpio-xilinx.c +++ b/drivers/gpio/gpio-xilinx.c @@ -371,8 +371,7 @@ static int __maybe_unused xgpio_resume(struct device *dev) static int __maybe_unused xgpio_runtime_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct xgpio_instance *gpio = platform_get_drvdata(pdev); + struct xgpio_instance *gpio = dev_get_drvdata(dev); clk_disable(gpio->clk); @@ -381,8 +380,7 @@ static int __maybe_unused xgpio_runtime_suspend(struct device *dev) static int __maybe_unused xgpio_runtime_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct xgpio_instance *gpio = platform_get_drvdata(pdev); + struct xgpio_instance *gpio = dev_get_drvdata(dev); return clk_enable(gpio->clk); } -- 2.30.2