From patchwork Wed Mar 21 10:08:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Ujfalusi X-Patchwork-Id: 10299205 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 59BA260385 for ; Wed, 21 Mar 2018 11:44:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A46C29805 for ; Wed, 21 Mar 2018 11:44:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D0FC29814; Wed, 21 Mar 2018 11:44:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id DD88729805 for ; Wed, 21 Mar 2018 11:44:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3183C6E919; Wed, 21 Mar 2018 11:44:24 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by gabe.freedesktop.org (Postfix) with ESMTPS id 147446E907 for ; Wed, 21 Mar 2018 11:44:23 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w2LA8b6W011836; Wed, 21 Mar 2018 05:08:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1521626917; bh=r+hd71QoL3Lgu3G6bx6I+mAOORTNLVhnYcBdZTMdLUM=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=af50yYZY3aDrglwfbYx3xn3fBPaRoObOCGHpYjUoTQFAQxW1DxMXocxNQjevUZF4o Iuqla7HjO7adPCfmupTJ3qJ89GNiEh8ezu3RTEEc+Mw2bPkBO/4yIcsg9TmsG9KG7e QTrEP7eIb5D8VWNGYePjQFs7zf9dj/LrDlwd6G6s= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2LA8bXH005205; Wed, 21 Mar 2018 05:08:37 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 21 Mar 2018 05:08:37 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Wed, 21 Mar 2018 05:08:37 -0500 Received: from feketebors.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w2LA8O1g013726; Wed, 21 Mar 2018 05:08:35 -0500 From: Peter Ujfalusi To: , Subject: [PATCH v2 5/6] drm/omap: dss: Remove display ordering from dss/display.c Date: Wed, 21 Mar 2018 12:08:30 +0200 Message-ID: <20180321100831.12716-6-peter.ujfalusi@ti.com> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180321100831.12716-1-peter.ujfalusi@ti.com> References: <20180321100831.12716-1-peter.ujfalusi@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, jsarha@ti.com, dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The previous patch implements the ordering of the dss_devices based on DT aliases in omap_drm.c, so there is no need to do the ordering in dss/display.c anymore. At the same time remove the alias member of the omap_dss_device struct since it is no longer needed. The only place it was used is in the omapdss_register_display() function. Signed-off-by: Peter Ujfalusi --- drivers/gpu/drm/omapdrm/dss/display.c | 15 +++------------ drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 -- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/display.c b/drivers/gpu/drm/omapdrm/dss/display.c index 3ef99f344bd3..7840837f4325 100644 --- a/drivers/gpu/drm/omapdrm/dss/display.c +++ b/drivers/gpu/drm/omapdrm/dss/display.c @@ -41,7 +41,6 @@ static int disp_num_counter; int omapdss_register_display(struct omap_dss_device *dssdev) { struct omap_dss_driver *drv = dssdev->driver; - struct list_head *cur; int id; /* @@ -54,26 +53,18 @@ int omapdss_register_display(struct omap_dss_device *dssdev) dssdev->alias_id = id; - snprintf(dssdev->alias, sizeof(dssdev->alias), "display%d", id); - /* Use 'label' property for name, if it exists */ of_property_read_string(dssdev->dev->of_node, "label", &dssdev->name); if (dssdev->name == NULL) - dssdev->name = dssdev->alias; + dssdev->name = devm_kasprintf(dssdev->dev, GFP_KERNEL, + "display%d", id); if (drv && drv->get_timings == NULL) drv->get_timings = omapdss_default_get_timings; mutex_lock(&panel_list_mutex); - list_for_each(cur, &panel_list) { - struct omap_dss_device *ldev = list_entry(cur, - struct omap_dss_device, - panel_list); - if (strcmp(ldev->alias, dssdev->alias) > 0) - break; - } - list_add_tail(&dssdev->panel_list, cur); + list_add_tail(&dssdev->panel_list, &panel_list); mutex_unlock(&panel_list_mutex); return 0; } diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h index d1056d0d32c2..d22212fd2f2a 100644 --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h @@ -465,8 +465,6 @@ struct omap_dss_device { struct list_head panel_list; - /* alias in the form of "display%d" */ - char alias[16]; int alias_id; enum omap_display_type type;