|
Look at the prototype request_irq of the 2.4 and 2.6 kernels.
2.4:
int request_irq (unsigned int irq,
void (* handler) (int, void *, struct pt_regs *),
unsigned long flags,
const char * dev_name,
void * dev_id);
2.6:
int request_irq (unsigned int irq,
irqreturn_t (* handler) (int, void *, struct pt_regs *),
unsigned long flags,
const char * dev_name,
void * dev_id);
The following is an excerpt from LDD3 (2.6kernel):
Interrupt handlers should return a value indicating whether there was actually an interrupt to handle. If the handler found that its device did, indeed, need attention, it should return IRQ_HANDLED; otherwise the return value should be IRQ_NONE. You can also generate the return value with this macro:
IRQ_RETVAL (handled)
where handled is nonzero if you were able to handle the interrupt. The return value is used by the kernel to detect and suppress spurious interrupts. If your device gives you no way to tell whether it really interrupted, you should return IRQ_HANDLED. |
|