Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1254248
  • 博文数量: 404
  • 博客积分: 10011
  • 博客等级: 上将
  • 技术积分: 5382
  • 用 户 组: 普通用户
  • 注册时间: 2008-09-03 16:29
文章存档

2010年(40)

2009年(140)

2008年(224)

我的朋友

分类: LINUX

2008-10-06 17:09:16

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) |
0

上一篇:内核API函数(转载)

下一篇:QTP基础使用

给主人留下些什么吧!~~