Received: by 10.192.165.156 with SMTP id m28csp777381imm; Thu, 19 Apr 2018 07:25:03 -0700 (PDT) X-Google-Smtp-Source: AIpwx49g4gYEOAYysdIDWgF2Rn8oUDxXGO1kvlPwZSFs7QVc0Tr4CcEenu8HmLPDoSYBJICQAkrl X-Received: by 2002:a17:902:4303:: with SMTP id i3-v6mr6597309pld.394.1524147903183; Thu, 19 Apr 2018 07:25:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147903; cv=none; d=google.com; s=arc-20160816; b=oPpeNqcDnGkRPOZycOt7kXfFEFq6Lv5hQlASAQBv/Cj3y9tcXm9K5Q4zpfhb/TiHky FnlYnBC2hJ4lI8v373fVvwAAHdn6jhW2Yn51XqBWh1NxPlNWdAGS/1x7sKj7jFQMHuS8 IioIp7MiIeqyB5BZ4b8WD96hqNerMym1QZRXILlKksQsZvE3DFmZ8h96lO2ahzrvRU9F sQXi3tI2SbER1AgkU0aZyPvC7fThJc+fg1BQT4/DLY6zI06LanlTrCtlv7A+BWvKqmoK RboDgwROStapDgpIImGJ/1NZYezwsaPB/oe5SPQUEFarfDL4ynlxZiZFyhO9x3UniXjc +spg== 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=ioI3CSzmG/Hx9QRqKduZ1LLoAXL5KkzM/0lacjGQnpo=; b=IHG5KxuRDmhu4RWSe3wP4wrv/MIVMcorA0CXsTq+BgvURRAJgQMf5FQsxdwu55iIYo wkLwjKMJ7vryOGP9qcqAdAneEmbDEIqJ8r3oZqupRG53d6h4vwfwasBk9RzN1653xzGw vWPhjh+QvnrGOWUOkp38oKsXP8O3fkXNT64v0u3ZnSdgD4VU0R7ALgDz62h8a+gVDfhx nBCFLIk3yVy4OH/Kk/92UFqI1G6hu6bLeaHECEmKj/nM+A1IfhOgr8T7DDXEQvICoJYy JvQppmuWWmmnR0x2bYgEfVtjlulNlhsVTm97+zbTUF/bcqv4MVOvZkoasxSbeaCF3N6H uVFg== 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 k10si2753480pgo.650.2018.04.19.07.24.49; Thu, 19 Apr 2018 07:25:03 -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 S1753713AbeDSOXf (ORCPT + 99 others); Thu, 19 Apr 2018 10:23:35 -0400 Received: from sauhun.de ([88.99.104.3]:45272 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753324AbeDSOG4 (ORCPT ); Thu, 19 Apr 2018 10:06:56 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 335E23139BB; 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 , Tomi Valkeinen , David Airlie , dri-devel@lists.freedesktop.org Subject: [PATCH 15/61] gpu: drm: omapdrm: displays: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:05:45 +0200 Message-Id: <20180419140641.27926-16-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/omapdrm/displays/panel-dsi-cm.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index 428de90fced1..8f8573a00e07 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -412,8 +412,7 @@ static const struct backlight_ops dsicm_bl_ops = { static ssize_t dsicm_num_errors_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct platform_device *pdev = to_platform_device(dev); - struct panel_drv_data *ddata = platform_get_drvdata(pdev); + struct panel_drv_data *ddata = dev_get_drvdata(dev); struct omap_dss_device *in = ddata->in; u8 errors = 0; int r; @@ -444,8 +443,7 @@ static ssize_t dsicm_num_errors_show(struct device *dev, static ssize_t dsicm_hw_revision_show(struct device *dev, struct device_attribute *attr, char *buf) { - struct platform_device *pdev = to_platform_device(dev); - struct panel_drv_data *ddata = platform_get_drvdata(pdev); + struct panel_drv_data *ddata = dev_get_drvdata(dev); struct omap_dss_device *in = ddata->in; u8 id1, id2, id3; int r; @@ -476,8 +474,7 @@ static ssize_t dsicm_store_ulps(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - struct platform_device *pdev = to_platform_device(dev); - struct panel_drv_data *ddata = platform_get_drvdata(pdev); + struct panel_drv_data *ddata = dev_get_drvdata(dev); struct omap_dss_device *in = ddata->in; unsigned long t; int r; @@ -511,8 +508,7 @@ static ssize_t dsicm_show_ulps(struct device *dev, struct device_attribute *attr, char *buf) { - struct platform_device *pdev = to_platform_device(dev); - struct panel_drv_data *ddata = platform_get_drvdata(pdev); + struct panel_drv_data *ddata = dev_get_drvdata(dev); unsigned int t; mutex_lock(&ddata->lock); @@ -526,8 +522,7 @@ static ssize_t dsicm_store_ulps_timeout(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - struct platform_device *pdev = to_platform_device(dev); - struct panel_drv_data *ddata = platform_get_drvdata(pdev); + struct panel_drv_data *ddata = dev_get_drvdata(dev); struct omap_dss_device *in = ddata->in; unsigned long t; int r; @@ -558,8 +553,7 @@ static ssize_t dsicm_show_ulps_timeout(struct device *dev, struct device_attribute *attr, char *buf) { - struct platform_device *pdev = to_platform_device(dev); - struct panel_drv_data *ddata = platform_get_drvdata(pdev); + struct panel_drv_data *ddata = dev_get_drvdata(dev); unsigned int t; mutex_lock(&ddata->lock); -- 2.11.0