[PATCH] gpu:drm:tilcdc: backlight node never found (original) (raw)

Anatolij Gustschin agust at denx.de
Thu Feb 13 15:37:20 PST 2014


On Thu, 13 Feb 2014 14:47:38 +0100 Heiko Schocher <hs at denx.de> wrote:

In panelprobe() the backlight node is never found, correct this.

Signed-off-by: Heiko Schocher <hs at denx.de>

Acked-by: Anatolij Gustschin <agust at denx.de>

Cc: Anatolij Gustschin <agust at denx.de> Cc: Benoit Parrot <bparrot at ti.com> Cc: Rob Clark <robdclark at gmail.com> Cc: David Airlie <airlied at linux.ie> Cc: Grant Likely <grant.likely at linaro.org> Cc: Rob Herring <robh+dt at kernel.org> Cc: Tomi Valkeinen <tomi.valkeinen at ti.com> Cc: Sachin Kamat <sachin.kamat at linaro.org> Cc: dri-devel at lists.freedesktop.org Cc: linux-kernel at vger.kernel.org Cc: devicetree at vger.kernel.org --- drivers/gpu/drm/tilcdc/tilcdcpanel.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdcpanel.c b/drivers/gpu/drm/tilcdc/tilcdcpanel.c index 86c6732..0b97cf4 100644 --- a/drivers/gpu/drm/tilcdc/tilcdcpanel.c +++ b/drivers/gpu/drm/tilcdc/tilcdcpanel.c @@ -356,6 +356,7 @@ static struct ofdeviceid panelofmatch[]; static int panelprobe(struct platformdevice *pdev) { struct devicenode *node = pdev->dev.ofnode; + struct devicenode *backlightnode; struct panelmodule *panelmod; struct tilcdcmodule *mod; struct pinctrl *pinctrl; @@ -395,9 +396,15 @@ static int panelprobe(struct platformdevice *pdev) mod->preferredbpp = panelmod->info->bpp; - panelmod->backlight = offindbacklightbynode(node); - if (panelmod->backlight) - devinfo(&pdev->dev, "found backlight\n"); + backlightnode = ofparsephandle(pdev->dev.ofnode, "backlight", 0); + if (backlightnode) { + panelmod->backlight = + offindbacklightbynode(backlightnode); + if (panelmod->backlight) + devinfo(&pdev->dev, "found backlight\n"); + } else { + devwarn(&pdev->dev, "backlight node missing...\n"); + } return 0;



More information about the dri-devel mailing list