lkml.org 
[lkml]   [2003]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.5.63: 'Debug: sleeping function called from illegal context
On Sun, Mar 02, 2003 at 04:15:25PM +0100, Manfred Spraul wrote:
> I would propose something like the attached patch - it handles all archs
> that support disable_irq on an unregistered interrupt. The remaining
> arch [which one, btw] must implement request_irq_disabled().
>...
> +{
> + int retval;
> + disable_irq(irq);
> + retval = request_irq(irq, handler, irqflags, devname, dev_id);
> + if (retval < 0)
> + enable_irq(irq);
> + return retval;
> +}
> +#endif

request_irq() explicitly enables the interrupt source no matter how many
times you call disable_irq() before hand.

--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.079 / U:1.600 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site