Received: by 10.192.165.156 with SMTP id m28csp778262imm; Thu, 19 Apr 2018 07:25:52 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/fnU47KT0dPKSI0v4xiwB0tC1NsWguzgKRGA38doPps4TTe5wdkrLMW30GhhckZbxy73K9 X-Received: by 2002:a17:902:6986:: with SMTP id l6-v6mr6361702plk.209.1524147952148; Thu, 19 Apr 2018 07:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147952; cv=none; d=google.com; s=arc-20160816; b=kW/ae5hAJizGVjHvYu9WYyj4j/buoOhT0QcmnPEMZiJCaTyarT3NccpNCkypHilJz0 nO63bB+J76ajp3LI7TcQl0mFBCPDkM55Kd3hoKN1OQgZPFb8NSbf0B23x7QiJLjzZM9t MpCufOYR3sfxQI/bpX936TgnhnCAIyNFuYpLsEeRXbUpZQ4kFV4MDSY4et9d1+Re55/I 3aVVJtNLi8RRUJ/jSKHpGt5FBFUdQ6MPBuFPXQC4MdhRHHHKzt07Rr4SabuYLtUmhcSc us0Uaz3aL4dnU9JUy27pZpYZ/w7BHMMlVyAhMyNiaCYatp7C1qHgNakaa37ObL3YmFL8 63OQ== 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=JNeFm6gHQNXZYC+DP0Ux/+GT/L9vNvAvvEPfDzMRiPE=; b=YLwcAHlQLTCAdXuKkwmr7D2byo97p/PpbC+uwA2oSiYU8ZcLzSmlMcSTWOkKvUOX8l OXS6SiNoU3mAxyy8x/LXxHufldRthEEY/n9GxM3P214xWWUsMserj3gttaYvP0nh8cXU HbENAsVao1cqoNlfXi/SCeJZBRK3/dF1PW9xPM0aBNXrbRN+aVN9MWiLMSA55523gxxg ObPEqQDfqLs0qKeWP6tor69n4jGJOMFn4iMCY+HYsfZeDfVXa9LG0CQwImk2w794GHf8 ppCy89FMDa4NG0bTU2Fp0GNmrSHzwqym0/wQ0ASPe1yhy5fNzvTTA2uFsc2oqOluINCK QfCw== 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 s21si3389487pfi.87.2018.04.19.07.25.38; Thu, 19 Apr 2018 07:25:52 -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 S1753525AbeDSOYQ (ORCPT + 99 others); Thu, 19 Apr 2018 10:24:16 -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 S1753039AbeDSOGy (ORCPT ); Thu, 19 Apr 2018 10:06:54 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id D9CB93139B8; Thu, 19 Apr 2018 16:06:52 +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 , Rob Clark , David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org Subject: [PATCH 12/61] gpu: drm: msm: adreno: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:42 +0200 Message-Id: <20180419140641.27926-13-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/gpu/drm/msm/adreno/adreno_device.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c index 8e0cb161754b..125c115c7ab4 100644 --- a/drivers/gpu/drm/msm/adreno/adreno_device.c +++ b/drivers/gpu/drm/msm/adreno/adreno_device.c @@ -301,16 +301,14 @@ static const struct of_device_id dt_match[] = { #ifdef CONFIG_PM static int adreno_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct msm_gpu *gpu = platform_get_drvdata(pdev); + struct msm_gpu *gpu = dev_get_drvdata(dev); return gpu->funcs->pm_resume(gpu); } static int adreno_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct msm_gpu *gpu = platform_get_drvdata(pdev); + struct msm_gpu *gpu = dev_get_drvdata(dev); return gpu->funcs->pm_suspend(gpu); } -- 2.11.0