Received: by 10.192.165.156 with SMTP id m28csp778905imm; Thu, 19 Apr 2018 07:26:30 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/Wb7unu6rEmVmFBRD0d8YtifPgwtQx1WjMCtu20sIKQUGnBrVsDNUvXFGhpWnPsHCQhh5D X-Received: by 2002:a17:902:988d:: with SMTP id s13-v6mr6170636plp.30.1524147990191; Thu, 19 Apr 2018 07:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147990; cv=none; d=google.com; s=arc-20160816; b=jFotxh4oenPMiPppgymI8xc77mAFkXznG9BylyuVwyT4jDHLMBig8MQcmVPEhsOxiu FthEj+MpB/TZlyGZOGhfBodgMLs5Y6odbXqJ8iDpGqQh5AxIiIBSJC5CFwjdnTiG+erB cSbhqmpFQjO9TWH2w4LMXaFryn6eBCLADibbKePpn0jSb7uySjR5ADlWbRfpoEj43osF DMHf2ILhuSDeMiuC/Eft0k1Lp05e0YHfZDDi2j+wcH8gun29PrWjOD0usoxkVJaG9fFz aMg+SXM4Z701Mf42dFrgpMcB/A08IY4YJyIQaju/LifFxcwLvxRGd3qyXrTASXje7eaK cVZw== 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=p0eXaQc+m6yE8CtvhqaHbmNjjVH9B8w87PIJPCfiN6o=; b=tplWV/FcwpetFI1a96fKOhLINeMtsdgfuYI9V1wy4RkuEpxFG91d2UoAuly7M7wPhF q2ZznCNU/Ov9swS5Xahg+RvhnsnXxIybPRoP97AyN2Nb8rXyBea8Jh5ZKeUitFmV1oWD OqbXMqSHvZh0hjg5gOWzl1SEliRsvch3Rme3/Q7vkYiDb60oLcBICKawLVnntZ5gtGug s2FPJcpEvgIH7Ol7k1/tRuTLlboMYIt4s6p1z0GLpCGNV/ioXDSVDAZAdpPWw9iHw9qK 3T4GpLvOIsHMlz2dCVKbGdX1RsEOWCjeRm/FZI5+GkvUGxhQQmmJbO9DNmLqQVdXp+2z k1Rg== 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.26.16; Thu, 19 Apr 2018 07:26:30 -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 S1753807AbeDSOY7 (ORCPT + 99 others); Thu, 19 Apr 2018 10:24:59 -0400 Received: from sauhun.de ([88.99.104.3]:45342 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753229AbeDSOGy (ORCPT ); Thu, 19 Apr 2018 10:06:54 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 6E3B63139B7; 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 11/61] gpu: drm: msm: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:41 +0200 Message-Id: <20180419140641.27926-12-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/msm_drv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c index 30cd514d8f7c..5fdd6cf6bf42 100644 --- a/drivers/gpu/drm/msm/msm_drv.c +++ b/drivers/gpu/drm/msm/msm_drv.c @@ -203,8 +203,7 @@ static int vblank_ctrl_queue_work(struct msm_drm_private *priv, static int msm_drm_uninit(struct device *dev) { - struct platform_device *pdev = to_platform_device(dev); - struct drm_device *ddev = platform_get_drvdata(pdev); + struct drm_device *ddev = dev_get_drvdata(dev); struct msm_drm_private *priv = ddev->dev_private; struct msm_kms *kms = priv->kms; struct msm_vblank_ctrl *vbl_ctrl = &priv->vblank_ctrl; -- 2.11.0