Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3286790yba; Tue, 23 Apr 2019 00:44:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEo0eBysMb5RSrNrYBouYd95BUJ69+1RAhNchtIyKehrbHNTQxp/shT0p6QADL9P6LPnlM X-Received: by 2002:aa7:9912:: with SMTP id z18mr2767526pff.140.1556005449088; Tue, 23 Apr 2019 00:44:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556005449; cv=none; d=google.com; s=arc-20160816; b=B9EWGOQEL1JKS7tyxMW552fd4LbbJbJaBXmau0kXgFN7OUW9iJbRVbsrRADgCTZhMp qaw3B8T7m79uSa1caxvHwYzH/Uc8/0NOcQtz4KG0M++NGEQKhe28jBa291lgWKpyVbRc WoCcj0dTqfdlbWhlr3y0puw7ydxnuvUbOqPE/RZnZUYjBoBTSgezB6tR3Efn3Qr4xDqf YibdrlCkKNUGJI+4OuzEn0vGsc5Wg8ucs9Ac4w0yKmG9TNVlQBUpSBoMwkhX4e+kwKfu d61oX3WzPrAoAdQR+oZGnxHbIJiiyNg9cMu/ECvam8tSpaZbdMV0LIVWTBMnmNiELnoK diRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=bj6DcdU2zkm8dd9z7l/cLxanz9gZg4O6YyhHCzFAqdc=; b=xLX1lUFzXj6YR+JelMiAYGWWi2J4jJTi4C7Czy6ojMRJZwzY0bKF1uhbDE5R/0FqsT VaL6va75u+DvozNdSPnirVMXoTlIac3He3h6m+xxcx1fIzDgVgUC73ki8hQWhlQshyED pDQ5SJQ4cHAQIUnhfdC2MXCsciZiq36hEE5TxnpsAFn2kjDFBujOydoSujjWcpAJOmX2 rHsyvCKvJY2WMx94f+ZCOFXAAbLRKVjS9DWvB5/8Ki72V2+tQDmYMYIarcI7g3Jdnne7 i5orjRyzYZY7Su6cuTHm0wAPBYLqVvPoe1LZprw5ipFs/WYH3zT2ZNYnaD7RlyTgtUf/ Acgw== 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 91si15741438ply.104.2019.04.23.00.43.53; Tue, 23 Apr 2019 00:44:09 -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 S1726651AbfDWHkW (ORCPT + 99 others); Tue, 23 Apr 2019 03:40:22 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6681 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726597AbfDWHkU (ORCPT ); Tue, 23 Apr 2019 03:40:20 -0400 Received: from DGGEMS405-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id D7FAB462534D3D17ABC7; Tue, 23 Apr 2019 15:40:12 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS405-HUB.china.huawei.com (10.3.19.205) with Microsoft SMTP Server id 14.3.439.0; Tue, 23 Apr 2019 15:40:05 +0800 From: Kefeng Wang To: CC: Masahiro Yamada , Kefeng Wang , Tomi Valkeinen , "David Airlie" , Daniel Vetter , Subject: [PATCH next 06/25] drm/omap: Use dev_get_drvdata() Date: Tue, 23 Apr 2019 15:50:01 +0800 Message-ID: <20190423075020.173734-7-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190423075020.173734-1-wangkefeng.wang@huawei.com> References: <20190423075020.173734-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using dev_get_drvdata directly. Cc: Tomi Valkeinen Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel@lists.freedesktop.org Signed-off-by: Kefeng Wang --- .../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 741a5e324767..913e8291a917 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -410,8 +410,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 *src = ddata->src; u8 errors = 0; int r; @@ -442,8 +441,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 *src = ddata->src; u8 id1, id2, id3; int r; @@ -474,8 +472,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 *src = ddata->src; unsigned long t; int r; @@ -509,8 +506,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); @@ -524,8 +520,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 *src = ddata->src; unsigned long t; int r; @@ -556,8 +551,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.20.1