From patchwork Mon Sep 20 09:05:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wolfram Sang X-Patchwork-Id: 12505089 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2CADCC433F5 for ; Mon, 20 Sep 2021 11:01:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A693E6058D for ; Mon, 20 Sep 2021 11:01:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org A693E6058D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sang-engineering.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC0DB6E4AA; Mon, 20 Sep 2021 11:00:56 +0000 (UTC) Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by gabe.freedesktop.org (Postfix) with ESMTPS id D9B6B6E454 for ; Mon, 20 Sep 2021 09:15:05 +0000 (UTC) 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 X-Mailman-Approved-At: Mon, 20 Sep 2021 11:00:52 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Reviewed-by: Alyssa Rosenzweig Reviewed-by: Steven Price --- 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;