On Tuesday 18 March 2008, Andrew Morton wrote:So something like the appended patch would seem "better"? ============== It appears that we can't just check to see if we're in a task context ... so instead of trying that, just make the relevant leds always schedule a little worklet. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> --- drivers/leds/leds-gpio.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) --- g26.orig/drivers/leds/leds-gpio.c 2008-03-18 01:32:08.000000000 -0700 +++ g26/drivers/leds/leds-gpio.c 2008-03-18 02:01:23.000000000 -0700 @@ -49,13 +49,13 @@ static void gpio_led_set(struct led_clas if (led_dat->active_low) level = !level; - /* setting GPIOs with I2C/etc requires a preemptible task context */ + /* Setting GPIOs with I2C/etc requires a task context, and we don't + * seem to have a reliable way to know if we're already in one; so + * let's just assume the worst. + */ if (led_dat->can_sleep) { - if (preempt_count()) { - led_dat->new_level = level; - schedule_work(&led_dat->work); - } else - gpio_set_value_cansleep(led_dat->gpio, level); + led_dat->new_level = level; + schedule_work(&led_dat->work); } else gpio_set_value(led_dat->gpio, level); } --
| Jeremy Fitzhardinge | Re: [RFC 00/15] x86_64: Optimize percpu accesses |
| jmerkey | [ANNOUNCE] mdb: Merkey's Linux Kernel Debugger 2.6.27-rc4 released |
| Greg Kroah-Hartman | [PATCH 021/196] ISDN: Convert from class_device to device for ISDN capi |
| Ingo Molnar | Re: [PATCH 00/23] per device dirty throttling -v8 |
git: | |
| Linus Torvalds | Re: VCS comparison table |
| Peter Stahlir | Git as a filesystem |
| Johannes Schindelin | Re: git on MacOSX and files with decomposed utf-8 file names |
| Bill Lear | Meaning of "fatal: protocol error: bad line length character"? |
| Mayuresh Kathe | Re: What is our ultimate goal?? |
| Richard Stallman | Real men don't attack straw men |
| bofh | Re: web development on OpenBSD |
| Kevin | uvm_mapent_alloc: out of static map entries on 4.3 i386 |
| Mark Lord | Re: 2.6.25-rc8: FTP transfer errors |
| Evgeniy Polyakov | Re: [BUG] New Kernel Bugs |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Andi Kleen | [PATCH RFC] [1/9] Core module symbol namespaces code and intro. |
