Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1806623pxb; Mon, 20 Sep 2021 05:53:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzGER8BFy4PGQpxrehs4LEKCq7Tt6VGh/Y46ghbhBUgOC4taQTW9iyq+jeOWpgJDo6a3xOv X-Received: by 2002:a02:1dc9:: with SMTP id 192mr19589463jaj.92.1632142435197; Mon, 20 Sep 2021 05:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632142435; cv=none; d=google.com; s=arc-20160816; b=J83k3AaI/VvAqG/WBJzXn2hTXHIqs4PAUQ50mLe63CkYfhQVCDwLipocPQ9wv66a5K 5X15YpGymEnvGxBNVNnjMpheTOVvjtedrhMH7ftTjbbZh+MZxPZjS4xWeAgOyV5LuvvD e+L8OG0zpzArMUofXQ9nEcZm9safX9ybYtS70Vh5LnvEhTGTPIgK99biXG7dl21d8/Bo HcKWbRc1Xr9D9vkZ5hCfrpRvBAIaEh001BANPvg00Z+5+DNN1uGLWcVM7lg4aE/LS2/U kDcbCJQ0n4vOySvJi8nT+2dlNT/eegzOH0ypeiNhh1NYMIiBCGrZUpLPEUy4GlX0yshI LZNg== 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=3ppHT16Xhw9zwLuRWsvp1FtrMFxIiqHYz31LXPnF/kI=; b=iwBWv8QuX0Ic2b8JP/XnwPePBB6cBQ+f/GEH92Zp0WBHzywHBBswTZOYz2ZuW5dWwS IUcQoxu0+n/OXg5xqfxcIGr/84ZcTHe1zhJFp6j9yQdAG+syP0IbrFr3rPFs/WaWVKXl pYSitQ9wojgMTYdfKcj575VJbe2IldXlktp1aUbK58jVrfh/0VMdIp00fhwFv3TZYBVZ bUPWlU8UMCQMfjIH4e5MtJB1tDgaHrDzWVv6mzawnHDRdi6AAHxXBbGssbcwpJzGhoBD 4AinjvrqN6sWfLAZzkt51kUr6ujUEX3tWrqzhycLwQH5Zw+JR2vVTAeqoLOubq9arvJW K4gw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=GJO6RKg3; 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 v6si12907446iof.105.2021.09.20.05.53.43; Mon, 20 Sep 2021 05:53:55 -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=GJO6RKg3; 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 S236195AbhITJI1 (ORCPT + 99 others); Mon, 20 Sep 2021 05:08:27 -0400 Received: from www.zeus03.de ([194.117.254.33]:54336 "EHLO mail.zeus03.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236149AbhITJHT (ORCPT ); Mon, 20 Sep 2021 05:07:19 -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=40/A5X1ISICwGc +yxpC3FVjdEcLDofeLo02oc4lIiDw=; b=GJO6RKg3hE30a4q9iMo4xd8OeWjJ/c /saDcxBsI7Z+kK9DkwlUaYUDfrnIMA6I845F6RtH6J/vvS0ogGth/V8aRjXXyqfG 0N70znhZvtec5jKt0TlcNs0FopjHdzOIIJx2h8fBb/w6SvkBPthaVcpfG/hBTBjG k5mE1U8/QpCYQ= Received: (qmail 2412696 invoked from network); 20 Sep 2021 11:05:25 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 20 Sep 2021 11:05:25 +0200 X-UD-Smtp-Session: l3s3148p1@5TfslGnMEIsgAwDPXwlxANIWpbLKE1Uh From: Wolfram Sang To: linux-kernel@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Rob Herring , Tomeu Vizoso , Steven Price , Alyssa Rosenzweig , David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org Subject: [PATCH 5/9] drm/panfrost: simplify getting .driver_data Date: Mon, 20 Sep 2021 11:05:17 +0200 Message-Id: <20210920090522.23784-6-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/gpu/drm/panfrost/panfrost_device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c index bd9b7be63b0f..fd4309209088 100644 --- a/drivers/gpu/drm/panfrost/panfrost_device.c +++ b/drivers/gpu/drm/panfrost/panfrost_device.c @@ -400,8 +400,7 @@ void panfrost_device_reset(struct panfrost_device *pfdev) #ifdef CONFIG_PM int panfrost_device_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct panfrost_device *pfdev = platform_get_drvdata(pdev); + struct panfrost_device *pfdev = dev_get_drvdata(dev); panfrost_device_reset(pfdev); panfrost_devfreq_resume(pfdev); @@ -411,8 +410,7 @@ int panfrost_device_resume(struct device *dev) int panfrost_device_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct panfrost_device *pfdev = platform_get_drvdata(pdev); + struct panfrost_device *pfdev = dev_get_drvdata(dev); if (!panfrost_job_is_idle(pfdev)) return -EBUSY; -- 2.30.2