From patchwork Fri Aug 9 08:38:49 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 2841761 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CBB9CBF546 for ; Fri, 9 Aug 2013 08:40:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 032D1201EB for ; Fri, 9 Aug 2013 08:40:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1CE9D2024D for ; Fri, 9 Aug 2013 08:40:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030646Ab3HIIjn (ORCPT ); Fri, 9 Aug 2013 04:39:43 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:48242 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030614Ab3HIIjf (ORCPT ); Fri, 9 Aug 2013 04:39:35 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id r798dWiT005038; Fri, 9 Aug 2013 03:39:32 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id r798dWfQ013771; Fri, 9 Aug 2013 03:39:32 -0500 Received: from dlelxv22.itg.ti.com (172.17.1.197) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Fri, 9 Aug 2013 03:39:32 -0500 Received: from deskari.tieu.ti.com (h68-4.vpn.ti.com [172.24.68.4]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id r798dKuC030588; Fri, 9 Aug 2013 03:39:30 -0500 From: Tomi Valkeinen To: , , CC: Archit Taneja , Laurent Pinchart , Nishanth Menon , Felipe Balbi , Santosh Shilimkar , Tony Lindgren , Tomi Valkeinen Subject: [RFC 04/22] OMAPDSS: if dssdev->name==NULL, use alias Date: Fri, 9 Aug 2013 11:38:49 +0300 Message-ID: <1376037547-10859-5-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1376037547-10859-1-git-send-email-tomi.valkeinen@ti.com> References: <1376037547-10859-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP To avoid the need for a "nickname" property for each display, change the display registration so that the display's alias (i.e. "display0" etc) will be used for the dssdev->name if the display driver didn't provide a name. This means that when booting with board files, we will have more descriptive names for displays, like "lcd1", "hdmi". With DT we'll only have "display0", etc. But as there are no "nicknames" for things like serials ports either, I hope we will do fine with this approach. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/display.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/omap2/dss/display.c b/drivers/video/omap2/dss/display.c index fafe7c9..64fb6e5 100644 --- a/drivers/video/omap2/dss/display.c +++ b/drivers/video/omap2/dss/display.c @@ -137,6 +137,9 @@ int omapdss_register_display(struct omap_dss_device *dssdev) snprintf(dssdev->alias, sizeof(dssdev->alias), "display%d", disp_num_counter++); + if (dssdev->name == NULL) + dssdev->name = dssdev->alias; + if (drv && drv->get_resolution == NULL) drv->get_resolution = omapdss_default_get_resolution; if (drv && drv->get_recommended_bpp == NULL)