warning: passing arg 2 of `request_irq' from incompatible pointer type
linux-2.6.24/include/linux/interrupt.h
---------------------------------------------------
extern int __must_check request_irq(unsigned int, irq_handler_t handler,
unsigned long, const char *, void *);
typedef irqreturn_t (*irq_handler_t)(int, void *);
linux-2.6.10/include/linux/interrupt.h
---------------------------------------------------
extern int request_irq(unsigned int,
irqreturn_t (*handler)(int, void *, struct pt_regs *),
unsigned long, const char *, void *);
request_irq()返回-16
---------------------------------------------------
#define EBUSY 16 /* Device or resource busy */
表示中断已经被使用
中断处理程序的返回值
---------------------------------------------------
/*
* IRQ_NONE means we didn't handle it.
* IRQ_HANDLED means that we did have a valid interrupt and handled it.
* IRQ_RETVAL(x) selects on the two depending on x being non-zero (for handled)
*/
typedef int irqreturn_t;
#define IRQ_NONE (0)
#define IRQ_HANDLED (1)
#define IRQ_RETVAL(x) ((x) != 0)
阅读(1501) | 评论(0) | 转发(0) |