Received: by 10.192.165.156 with SMTP id m28csp762158imm; Thu, 19 Apr 2018 07:11:13 -0700 (PDT) X-Google-Smtp-Source: AIpwx481+lsWpusD7KQ484QvZnp+WBMyJkAXksWmavHcncyoW5B3RqrY5Vo7HgwcIS+JaSMjbviH X-Received: by 2002:a17:902:1665:: with SMTP id g92-v6mr6373509plg.195.1524147073504; Thu, 19 Apr 2018 07:11:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524147073; cv=none; d=google.com; s=arc-20160816; b=NxpEJ6c+JHAHAZtVsT7FYlkdIbUUxc0rMAD20moeMx+2kELcnwPgCSbWd6hgIEyzeo ITQd7bEA5T7dSK+AqwRo9MiRSz+9nNs+zIx0KQ6OUEzdznR4+USjIqunH9AlID2UNASs Tt6zGJs011z8iIYxx5UvIiX+UrbXvzV1Icc98/8vZvE6fZCX2aPYyke8yAjKf4r+n0gA Bw0xNqmOVUuZibJ5svQV7itWsJYEBrXEC8C+j3uXxskEuN8rKyHPrh+flfHBjrc51leP Pb0m8XfgKWosRRK0OhmmHg/mT82z6qF+lDLuDKALNVoYez/2pSR6z0WpNdTc9DjVLuRz DKxQ== 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=p5ZIozrut6qBCFvDpjfiTtIunCcyFyG+xhpt3ytiQmU=; b=HI9HiZlecLYSizc04TZOaIzDVPEIFnubSaRhXTn+4w1H5s2pLv8XUsu78xOEpWbRLP ti5YncgLMApSMX7JZiKEftCkiVyQjbt2z/CBYTA28NEsgN8VTrFQ8DVX9q2RdLtw5OXm r2xJLpt9eAvgojz7lcWqd3qWi0lV67e5X0v2XDmSJle7qvH+BiigCfKntN2tLKXlotzA pzJWcO9yBxEEhpNOWIdvfUI1Z7win5938xHuKFeJU2tTTepRwfi+aV9G1PRW9sLXsfnJ egmX5K+ITClIYRTKjq/GpfS8KNyt6rMEdY16zsfuss4HBv6Ak9xQheMw/LBgFgxNZrM4 xudQ== 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 f35-v6si1144267plh.193.2018.04.19.07.10.59; Thu, 19 Apr 2018 07:11:13 -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 S1753759AbeDSOJN (ORCPT + 99 others); Thu, 19 Apr 2018 10:09:13 -0400 Received: from sauhun.de ([88.99.104.3]:45626 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753568AbeDSOHQ (ORCPT ); Thu, 19 Apr 2018 10:07:16 -0400 Received: from localhost (unknown [145.253.130.2]) by pokefinder.org (Postfix) with ESMTPSA id 9B0703139C7; Thu, 19 Apr 2018 16:07:14 +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 , Bartlomiej Zolnierkiewicz , linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH 58/61] video: fbdev: omap2: omapfb: displays: simplify getting .drvdata Date: Thu, 19 Apr 2018 16:06:28 +0200 Message-Id: <20180419140641.27926-59-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. .../video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c index bef431530090..87497a00241f 100644 --- a/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c +++ b/drivers/video/fbdev/omap2/omapfb/displays/panel-dsi-cm.c @@ -387,8 +387,7 @@ static void dsicm_get_resolution(struct omap_dss_device *dssdev, 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; @@ -419,8 +418,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; @@ -451,8 +449,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; @@ -486,8 +483,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 t; mutex_lock(&ddata->lock); @@ -501,8 +497,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; @@ -533,8 +528,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 t; mutex_lock(&ddata->lock); -- 2.11.0