Messages in this thread | | | Date | Wed, 6 Jun 2012 21:11:49 +0200 | From | Fabio Baltieri <> | Subject | Re: [PATCH v2] leds: fix led_brightness_set when soft-blinking |
| |
Hi Bryan,
On Wed, Jun 06, 2012 at 10:10:23PM +0800, Bryan Wu wrote: > Yeah, that's right. Rafal's patch was in my fixes-for-3.5 branch, I > will send out by this week for Linus. So I have to rebase all the > for-next patches on top of it. Although I got conflicts, I will fix > that. I prepared a new branch merged for-next and fixes-for-3.5 > together name devel, please help to test. > > http://git.kernel.org/?p=linux/kernel/git/cooloney/linux-leds.git;a=shortlog;h=refs/heads/devel
I realize now that my last patch broke ledtrig-timer updates as that works by passing delay_{on,off} values by pointer, and moving led_stop_software_blink() earlier destroy the other value.
That's a bit of a pitfall, as the old code was working because values were copied when entering led_set_software_blink.
I see three options here: - reverting back my leds: "fix led_brightness_set when soft-blinking" (9b05cd0) to the first version I posted, wich should work as before. - modify ledtrig-timer to use two internal variables to store delay_on and delay_off instead of the led_cdev ones. - moving the two led_cdev->blink_delay_xx = 0 only into led_brightness_set, as that's the only place when they are needed.
What you think about it?
I think the third option is the best, as it removes the pitfall and simplify the code a bit. I'll post that as a v3 "fix led_brightness_set when soft-blinking", would you consider replacing the last patch you applied in the new branch with the v3?
Fabio
| |