lkml.org 
[lkml]   [2008]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Keyboard interrupt - request_irq()
On Thu, 21 Feb 2008, Pioz wrote:

> I have a problem.
> I want handle the keyboard interrupt and for this purpose I have write
> this module (I have kernel 2.6.23):
[ ... ]
> res = request_irq (1, irq_myhandler, IRQF_SHARED, "bao", dev_id);
[ ... ]
> The return value of request_irq() function is -EBUSY. Why? Is the
> default handler? How can I do to change handler with my function?
> Thanks...

The check in setup_irq() very probably triggers for you:

/*
* Can't share interrupts unless both agree to and are
* the same type (level, edge, polarity). So both flag
* fields must have IRQF_SHARED set and the bits which
* set the trigger type must match.
*/
if (!((old->flags & new->flags) & IRQF_SHARED) ||
((old->flags ^ new->flags) & IRQF_TRIGGER_MASK)) {
old_name = old->name;
goto mismatch;
}

--
Jiri Kosina
SUSE Labs



\
 
 \ /
  Last update: 2008-02-22 10:31    [W:0.031 / U:0.496 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site