Re: 2.5.63: 'Debug: sleeping function called from illegal context
Russell King (rmk@arm.linux.org.uk)
Sun, 2 Mar 2003 19:13:01 +0000
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/