* [PATCH V2 07/09] led: enable led in 88pm860x
@ 2009-12-09 13:16 Haojian Zhuang
2009-12-09 15:14 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Haojian Zhuang @ 2009-12-09 13:16 UTC (permalink / raw)
To: linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2 07/09] led: enable led in 88pm860x
2009-12-09 13:16 [PATCH V2 07/09] led: enable led in 88pm860x Haojian Zhuang
@ 2009-12-09 15:14 ` Mark Brown
2009-12-10 3:57 ` Haojian Zhuang
0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2009-12-09 15:14 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Dec 09, 2009 at 08:16:21AM -0500, Haojian Zhuang wrote:
> + period = on + *delay_off;
> + if (period < LED_BLINK_PERIOD_MIN)
> + period = LED_BLINK_PERIOD_MIN;
> + if (period > LED_BLINK_PERIOD_MAX)
> + period = LED_BLINK_PERIOD_MAX;
If the hardware can't support the blink settings requested the driver
ought to return an error - there's a software fallback which will blink
the LED using a timer instead.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2 07/09] led: enable led in 88pm860x
2009-12-09 15:14 ` Mark Brown
@ 2009-12-10 3:57 ` Haojian Zhuang
2009-12-10 18:04 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Haojian Zhuang @ 2009-12-10 3:57 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Dec 9, 2009 at 10:14 AM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Wed, Dec 09, 2009 at 08:16:21AM -0500, Haojian Zhuang wrote:
>
>> + ? ? period = on + *delay_off;
>> + ? ? if (period < LED_BLINK_PERIOD_MIN)
>> + ? ? ? ? ? ? period = LED_BLINK_PERIOD_MIN;
>> + ? ? if (period > LED_BLINK_PERIOD_MAX)
>> + ? ? ? ? ? ? period = LED_BLINK_PERIOD_MAX;
>
> If the hardware can't support the blink settings requested the driver
> ought to return an error - there's a software fallback which will blink
> the LED using a timer instead.
>
Now return an error directly.
Thanks
Haojian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0007-led-enable-led-in-88pm860x.patch
Type: text/x-patch
Size: 10021 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20091209/a660e74a/attachment.bin>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2 07/09] led: enable led in 88pm860x
2009-12-10 3:57 ` Haojian Zhuang
@ 2009-12-10 18:04 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2009-12-10 18:04 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Dec 09, 2009 at 10:57:59PM -0500, Haojian Zhuang wrote:
> + on = *delay_on;
> + if ((on < LED_BLINK_ON_MIN) || (on > LED_BLINK_ON_MAX))
> + return -EINVAL;
You're returning -EINVAL here but...
> + period = on + *delay_off;
> + if (period < LED_BLINK_PERIOD_MIN)
> + period = LED_BLINK_PERIOD_MIN;
> + if (period > LED_BLINK_PERIOD_MAX)
> + period = LED_BLINK_PERIOD_MAX;
...I'd expect it also here?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-12-10 18:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-09 13:16 [PATCH V2 07/09] led: enable led in 88pm860x Haojian Zhuang
2009-12-09 15:14 ` Mark Brown
2009-12-10 3:57 ` Haojian Zhuang
2009-12-10 18:04 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).