[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5150D92A.4000206@gmail.com>
Date: Tue, 26 Mar 2013 10:09:30 +1100
From: Ryan Mallon <rmallon@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: Guennadi Liakhovetski <g.liakhovetski@....de>,
linux-kernel@...r.kernel.org,
Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Magnus Damm <magnus.damm@...il.com>,
Simon Horman <horms@...ge.net.au>,
devicetree-discuss@...ts.ozlabs.org,
Samuel Ortiz <sameo@...ux.intel.com>,
Richard Purdie <rpurdie@...ys.net>,
linux-fbdev@...r.kernel.org,
Guennadi Liakhovetski <g.liakhovetski+renesas@...il.com>
Subject: Re: [PATCH v3 3/3] backlight: as3711: add OF support
On 26/03/13 09:40, Andrew Morton wrote:
> On Fri, 22 Mar 2013 17:15:49 +0100 Guennadi Liakhovetski <g.liakhovetski@....de> wrote:
>
>> Add support for configuring AS3711 backlight driver from DT.
>>
>> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@...il.com>
>> Reviwed-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
>> ---
>> drivers/video/backlight/as3711_bl.c | 118 ++++++++++++++++++++++++++++++++++-
>> 1 files changed, 117 insertions(+), 1 deletions(-)
>>
>> diff --git a/drivers/video/backlight/as3711_bl.c b/drivers/video/backlight/as3711_bl.c
>> index 41d52fe..123887c 100644
>> --- a/drivers/video/backlight/as3711_bl.c
>> +++ b/drivers/video/backlight/as3711_bl.c
>> @@ -258,6 +258,109 @@ static int as3711_bl_register(struct platform_device *pdev,
>> return 0;
>> }
>>
>> +static int as3711_backlight_parse_dt(struct device *dev)
>> +{
>> + struct as3711_bl_pdata *pdata = dev_get_platdata(dev);
>> + struct device_node *bl =
>> + of_find_node_by_name(dev->parent->of_node, "backlight"), *fb;
>> + int ret;
>
> It's tidier to do
>
> struct device_node *bl;
>
> bl = of_find_node_by_name(dev->parent->of_node, "backlight"), *fb;
>
> and avoid the 80-col trickery.
The other reason being that it now becomes much more apparent that *fb
is not an argument to of_find_node_by_name(), but a second variable of
type struct device_node :-).
~Ryan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists