From patchwork Wed Dec 4 12:28:33 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 3282481 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 6FCB8C0D4B for ; Wed, 4 Dec 2013 12:32:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6509020240 for ; Wed, 4 Dec 2013 12:32:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 36636201C0 for ; Wed, 4 Dec 2013 12:31:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932182Ab3LDMbU (ORCPT ); Wed, 4 Dec 2013 07:31:20 -0500 Received: from devils.ext.ti.com ([198.47.26.153]:52580 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932206Ab3LDMaI (ORCPT ); Wed, 4 Dec 2013 07:30:08 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id rB4CU7f5026088; Wed, 4 Dec 2013 06:30:07 -0600 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rB4CU6iN021517; Wed, 4 Dec 2013 06:30:07 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.2.342.3; Wed, 4 Dec 2013 06:30:02 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id rB4CTkkr015425; Wed, 4 Dec 2013 06:30:01 -0600 From: Tomi Valkeinen To: , , CC: Archit Taneja , Darren Etheridge , Tony Lindgren , Tomi Valkeinen Subject: [PATCH 06/26] OMAPDSS: if dssdev->name==NULL, use alias Date: Wed, 4 Dec 2013 14:28:33 +0200 Message-ID: <1386160133-24026-7-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1386160133-24026-1-git-send-email-tomi.valkeinen@ti.com> References: <1386160133-24026-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 669a81fdf58e..a946cf7ed00f 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)