From mboxrd@z Thu Jan 1 00:00:00 1970 From: Archit Taneja Subject: [PATCH v2 7/7] OMAP: DSS2: Taal: Use device name in backlight_device_register Date: Thu, 12 May 2011 17:26:30 +0530 Message-ID: <1305201390-9724-8-git-send-email-archit@ti.com> References: <1305201390-9724-1-git-send-email-archit@ti.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from devils.ext.ti.com ([198.47.26.153]:38898 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756027Ab1ELLwO (ORCPT ); Thu, 12 May 2011 07:52:14 -0400 Received: from dlep34.itg.ti.com ([157.170.170.115]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id p4CBqEOC009503 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 12 May 2011 06:52:14 -0500 Received: from dlep26.itg.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id p4CBqD6Y008524 for ; Thu, 12 May 2011 06:52:13 -0500 (CDT) In-Reply-To: <1305201390-9724-1-git-send-email-archit@ti.com> Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: tomi.valkeinen@ti.com Cc: linux-omap@vger.kernel.org, Archit Taneja Panel Taal driver uses the string "taal" to register for a backlight device. This causes backlight_device_register() to fail when a second taal panel is added. Use dev_name(&dssdev->dev) as a parameter instead of the string. Note: This will break backlight related sysfs commands. Use the name as generated by the DSS2 driver, in the form "displayi", which represents the ith registered display device. Signed-off-by: Archit Taneja --- drivers/video/omap2/displays/panel-taal.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/omap2/displays/panel-taal.c b/drivers/video/omap2/displays/panel-taal.c index 90d79c0..fdd5d4a 100644 --- a/drivers/video/omap2/displays/panel-taal.c +++ b/drivers/video/omap2/displays/panel-taal.c @@ -1031,8 +1031,8 @@ static int taal_probe(struct omap_dss_device *dssdev) props.max_brightness = 127; props.type = BACKLIGHT_RAW; - bldev = backlight_device_register("taal", &dssdev->dev, dssdev, - &taal_bl_ops, &props); + bldev = backlight_device_register(dev_name(&dssdev->dev), &dssdev->dev, + dssdev, &taal_bl_ops, &props); if (IS_ERR(bldev)) { r = PTR_ERR(bldev); goto err_bl; -- 1.7.1