[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJuYYwTJOfCGUObv4+GakO8BN3N10=T6pH7MdCAiqtBrVGz1_Q@mail.gmail.com>
Date: Mon, 5 Dec 2011 14:44:14 +0530
From: Thomas Abraham <thomas.abraham@...aro.org>
To: balbi@...com
Cc: rpurdie@...ys.net, ben-linux@...ff.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-samsung-soc@...r.kernel.org, kgene.kim@...sung.com,
patches@...aro.org
Subject: Re: [PATCH] backlight: add regulator support for platform_lcd driver
Hi Felipe,
On 5 December 2011 14:22, Felipe Balbi <balbi@...com> wrote:
[...]
>> + if (lcd_power) {
>> + if (plcd->pdata->min_uV || plcd->pdata->max_uV)
>> + if (regulator_set_voltage(lcd_regulator,
>> + plcd->pdata->min_uV, plcd->pdata->max_uV))
>> + dev_info(plcd->us,
>> + "regulator voltage set failed\n");
>> +
>> + if (regulator_enable(lcd_regulator))
>> + dev_info(plcd->us, "failed to enable regulator\n");
>> + } else {
>> + regulator_disable(lcd_regulator);
>> + }
>> +
>> + regulator_put(lcd_regulator);
>
> I wonder why you ->get() and ->put() everytime here. Wouldn't it be
> enough to ->get() on probe() and ->put() on remove() ??
Thanks for the suggestion. It would be simpler if done in probe. I
will redo this patch.
Regards,
Thomas.
>
> --
> balbi
>
--
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