Received: by 10.192.165.156 with SMTP id m28csp777897imm; Thu, 19 Apr 2018 07:25:31 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/KeSt2m7Ko4wubGzLIYMN+J0hmzz9fvPcn2d7Bu1Fbx4pn7P7Qlw7/RsNYxK/pBLJ5wIrV X-Received: by 10.98.178.208 with SMTP id z77mr5880529pfl.122.1524147931901; Thu, 19 Apr 2018 07:25:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147931; cv=none; d=google.com; s=arc-20160816; b=jkyIJAidEPGBU9FJLYyPD0aY0g7eG0Q4qnI6OfPkAXOV+UiN2RpOF1v26kTrFVqZk6 TLR/APdksz2gbFNut5u1kpo4s+n18m2J+y7E0GAML8EExcQga/N8CGoPOk0s33BnUJrs IE5J0kNI+4xCRtBG0yIOW/dRsl4fIc2w9SLfPmu0jACvEfFKYW6AgyUxMAHAs6hXHaNj CjnkT727qQLBKXmC2NScDaj7z+D23Qe6QLMhuz0meJqmhxTDiw3NRBVAaI2VK1l9FHK6 sPQNY9wTlbpg+BOVpQRNHAuw0hzJDkJqupi3ZQFHs0g+sxzGmmXj7uECv2VqEE6ZCdFY TVoQ== 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=Qs06S4FzUKMosnBYN3HBS7bUThYrmsnx/F+ubZ407/I=; b=gSASD6F8VtFjgD4H/L6+3WRqSCpT+9YglIh8f+LsrjWKPnbmTVju61oEikeM8rm1My d8ysJRYVIjsGzQYeCOZsS5tl5qfeeqANhzdFHMx/tojkYYqb/itHUq+I+TRTbexMCIZp vIqoN+jhUexe5gGclmpNyxbczNA9Au7mm+NRpsFnwaru2YFj04R4EVQ7Wtoa5iZmEZr3 xL3iM1F42BmARxvsVblAPJy0IjNghvMyuGGeINnLLwqkqqRcKRRJKkzA6vYUaAlKK9XR PrGcGtJIAo/lVpGVaef9ypy5rBjP8Ax8erPyYSDLQ8EvawHRErAtYEzS/p4Rw0xojuJe fHGw== 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 s11-v6si3577014plp.443.2018.04.19.07.25.18; Thu, 19 Apr 2018 07:25:31 -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 S1753571AbeDSOWv (ORCPT + 99 others); Thu, 19 Apr 2018 10:22:51 -0400 Received: from sauhun.de ([88.99.104.3]:45386 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752337AbeDSOG4 (ORCPT ); Thu, 19 Apr 2018 10:06:56 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 9C2333139BC; Thu, 19 Apr 2018 16:06:54 +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 , Eric Anholt , David Airlie , dri-devel@lists.freedesktop.org Subject: [PATCH 16/61] gpu: drm: vc4: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:46 +0200 Message-Id: <20180419140641.27926-17-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/vc4/vc4_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 94b99c90425a..af9515ae0e0a 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -318,8 +318,7 @@ static int vc4_drm_bind(struct device *dev) static void vc4_drm_unbind(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct drm_device *drm = platform_get_drvdata(pdev); + struct drm_device *drm = dev_get_drvdata(dev); drm_dev_unregister(drm); -- 2.11.0