From patchwork Thu Feb 13 13:47:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Schocher X-Patchwork-Id: 3645901 Return-Path: X-Original-To: patchwork-dri-devel@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 ABE36BF13A for ; Thu, 13 Feb 2014 15:06:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C990C20154 for ; Thu, 13 Feb 2014 15:06:35 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 1B6872013A for ; Thu, 13 Feb 2014 15:06:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 58A31105847; Thu, 13 Feb 2014 07:06:08 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 435 seconds by postgrey-1.32 at gabe; Thu, 13 Feb 2014 05:54:58 PST Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by gabe.freedesktop.org (Postfix) with ESMTP id C1FA110579B for ; Thu, 13 Feb 2014 05:54:58 -0800 (PST) Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3fPzYn6Bjbz4KK6w; Thu, 13 Feb 2014 14:47:41 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3fPzYn5qhLzbbgx; Thu, 13 Feb 2014 14:47:41 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id GXY1mv4LS2oq; Thu, 13 Feb 2014 14:47:40 +0100 (CET) X-Auth-Info: zwkOPK6Pruv4JidJH+V63Qd0OF4iYUzmgiX62n/mfVQ= Received: from mail.denx.de (host-82-135-33-74.customer.m-online.net [82.135.33.74]) by smtp-auth.mnet-online.de (Postfix) with ESMTPA; Thu, 13 Feb 2014 14:47:40 +0100 (CET) Received: from pollux.denx.de (pollux [192.168.1.1]) by mail.denx.de (Postfix) with ESMTP id 69F15344681; Thu, 13 Feb 2014 14:47:40 +0100 (CET) Received: by pollux.denx.de (Postfix, from userid 515) id 376001366; Thu, 13 Feb 2014 14:47:40 +0100 (CET) From: Heiko Schocher To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] gpu:drm:tilcdc: backlight node never found Date: Thu, 13 Feb 2014 14:47:38 +0100 Message-Id: <1392299258-16968-1-git-send-email-hs@denx.de> X-Mailer: git-send-email 1.8.3.1 X-Mailman-Approved-At: Thu, 13 Feb 2014 07:06:00 -0800 Cc: devicetree@vger.kernel.org, Anatolij Gustschin , Tomi Valkeinen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Sachin Kamat , Rob Herring , Grant Likely , Heiko Schocher X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 In panel_probe() the backlight node is never found, correct this. Signed-off-by: Heiko Schocher Cc: Anatolij Gustschin Cc: Benoit Parrot Cc: Rob Clark Cc: David Airlie Cc: Grant Likely Cc: Rob Herring Cc: Tomi Valkeinen Cc: Sachin Kamat Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Acked-by: Anatolij Gustschin --- drivers/gpu/drm/tilcdc/tilcdc_panel.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c index 86c6732..0b97cf4 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c @@ -356,6 +356,7 @@ static struct of_device_id panel_of_match[]; static int panel_probe(struct platform_device *pdev) { struct device_node *node = pdev->dev.of_node; + struct device_node *backlight_node; struct panel_module *panel_mod; struct tilcdc_module *mod; struct pinctrl *pinctrl; @@ -395,9 +396,15 @@ static int panel_probe(struct platform_device *pdev) mod->preferred_bpp = panel_mod->info->bpp; - panel_mod->backlight = of_find_backlight_by_node(node); - if (panel_mod->backlight) - dev_info(&pdev->dev, "found backlight\n"); + backlight_node = of_parse_phandle(pdev->dev.of_node, "backlight", 0); + if (backlight_node) { + panel_mod->backlight = + of_find_backlight_by_node(backlight_node); + if (panel_mod->backlight) + dev_info(&pdev->dev, "found backlight\n"); + } else { + dev_warn(&pdev->dev, "backlight node missing...\n"); + } return 0;