Received: by 10.192.165.156 with SMTP id m28csp777710imm; Thu, 19 Apr 2018 07:25:20 -0700 (PDT) X-Google-Smtp-Source: AIpwx49bhKpm88ysPmDTNPRp6xXhPRMBS4c7HQ+zu+CAaOzZeCZApdob18HyBl3hAu+Q+vpQpD5+ X-Received: by 10.99.177.5 with SMTP id r5mr5184204pgf.186.1524147920016; Thu, 19 Apr 2018 07:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147919; cv=none; d=google.com; s=arc-20160816; b=EI5vvWkcMVqetnc+i0I5ImNHJdwxUz/m9PI34Gazbzcdf595RYZ3wHPZ4bsx7FUMjQ mnQNsZ/zKVcvfsSG43J4/RSwmdqsAGVazLdHSTojCccd2+Qo9hseDKiRMlx6QTWVmk5h OF1XBplT+ZUcI1+WSk0DB0gFJwZq4mZAiJbmvUpQNcja1GDTP/NVYYAvpTPBvmJEN1y+ qarQvsrxWyb38ksGBb3YtRtQ0RIgs4FS3hPrRQBoZPZ7JFf4gkWGnI2SugfsDXmXs0ng MChWsT3qjDZwse6pheStJN8ukXpxr1i7aHEUdBkgOCGKNSMAcutTrSV5dkn+oBzfSKat wwnA== 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=ffowhtHUWaFQRCHpjC7NEryjFdqiaOxO8W2LPIT7oh8=; b=zmqrAw71KAn9jVjMZ0E3mtuIevxBisdsnhLB2xhRBVFIfpvI90VibHdpyA0YpzZlq9 djEThjJyfVDEp1LRzf4dPqHso6Q2hroqjdid+qooQK09JI7/uz5KA5vDCzNO3hnIAmqJ ogGPUn42YLaBIY8E5icVbvxRC9ZJ3xaEPLgQDeZChWR8Emt9hylYc/lslpmpm6/y1IMr PW35EMOsB2kwJ5yLtsuBqxesPBYhzcohAC1rabXQR5vjOkSLDEB7GkazFchU0EBWlczS gnWTg2SyXB2W1sumPVZcXLMeDM+4wXfGMu2FfW5qSlU6wS1p4Qi3xX9IdQBFJuV6UyGE 3jfw== 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 r14si2963669pgt.292.2018.04.19.07.25.05; Thu, 19 Apr 2018 07:25:19 -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 S1753695AbeDSOWw (ORCPT + 99 others); Thu, 19 Apr 2018 10:22:52 -0400 Received: from sauhun.de ([88.99.104.3]:45378 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753330AbeDSOG4 (ORCPT ); Thu, 19 Apr 2018 10:06:56 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 5185A3139B9; Thu, 19 Apr 2018 16:06:53 +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 13/61] gpu: drm: msm: disp: mdp5: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:43 +0200 Message-Id: <20180419140641.27926-14-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/disp/mdp5/mdp5_kms.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c index 6d8e3a9a6fc0..d50927f00c6f 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c @@ -1014,8 +1014,7 @@ static int mdp5_dev_remove(struct platform_device *pdev) static __maybe_unused int mdp5_runtime_suspend(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct mdp5_kms *mdp5_kms = platform_get_drvdata(pdev); + struct mdp5_kms *mdp5_kms = dev_get_drvdata(dev); DBG(""); @@ -1024,8 +1023,7 @@ static __maybe_unused int mdp5_runtime_suspend(struct device *dev) static __maybe_unused int mdp5_runtime_resume(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct mdp5_kms *mdp5_kms = platform_get_drvdata(pdev); + struct mdp5_kms *mdp5_kms = dev_get_drvdata(dev); DBG(""); -- 2.11.0