[PATCH] powermac: defer work in backlight key press

Aristeu Sergio Rozanski Filho aris at valeta.org
Tue Jul 4 21:03:54 EST 2006


> > +	/* we can receive multiple interrupts here, but the scheduled work
> > +	 * will run only once, with the last value */
> > +	pmac_backlight_key_queued = direction;
> 
> Shouldn't you be doing something like using the whole
> pmac_backlight_key_queued in the workqueue, then setting it to 0 there
> and using += here? That way all keypresses will be adhered to.
today pmac_backlight_key() is called either with 0 (to reduce backlight
level) or 1 (to increase). I found that actually happening two
keystrokes between interrupt being serviced and actually running that
work queue would be so damn small that the extra code wouldn't be worth.
but if you think it's worth for, I can fix it, no problem.

-- 
Aristeu




More information about the Linuxppc-dev mailing list