当前位置: 技术问答>linux和unix
按键驱动移植
来源: 互联网 发布时间:2016-12-05
本文导语: 我的内核是2.6.35 fs2410开发板 s3c2410 的型号。 移植按键驱动时老是出现以下问题: drivers/char/button.c: In function 'init_gpio': drivers/char/button.c:127: error: 'IRQT_FALLING' undeclared (first use in this function) drivers/char/button....
我的内核是2.6.35 fs2410开发板 s3c2410 的型号。
移植按键驱动时老是出现以下问题:
drivers/char/button.c: In function 'init_gpio':
drivers/char/button.c:127: error: 'IRQT_FALLING' undeclared (first use in this function)
drivers/char/button.c:127: error: (Each undeclared identifier is reported only once
drivers/char/button.c:127: error: for each function it appears in.)
drivers/char/button.c: At top level:
drivers/char/button.c:247: warning: function declaration isn't a prototype
drivers/char/button.c: In function 'request_irqs':
drivers/char/button.c:249: warning: passing argument 2 of 'request_irq' from incompatible pointer type
drivers/char/button.c:252: warning: passing argument 2 of 'request_irq' from incompatible pointer type
drivers/char/button.c:255: warning: passing argument 2 of 'request_irq' from incompatible pointer type
drivers/char/button.c:258: warning: passing argument 2 of 'request_irq' from incompatible pointer type
我按照其他人说的往irq.h文件添加东西 还是不行
希望哪位能仔细说明一下 3Q 马立马去
移植按键驱动时老是出现以下问题:
drivers/char/button.c: In function 'init_gpio':
drivers/char/button.c:127: error: 'IRQT_FALLING' undeclared (first use in this function)
drivers/char/button.c:127: error: (Each undeclared identifier is reported only once
drivers/char/button.c:127: error: for each function it appears in.)
drivers/char/button.c: At top level:
drivers/char/button.c:247: warning: function declaration isn't a prototype
drivers/char/button.c: In function 'request_irqs':
drivers/char/button.c:249: warning: passing argument 2 of 'request_irq' from incompatible pointer type
drivers/char/button.c:252: warning: passing argument 2 of 'request_irq' from incompatible pointer type
drivers/char/button.c:255: warning: passing argument 2 of 'request_irq' from incompatible pointer type
drivers/char/button.c:258: warning: passing argument 2 of 'request_irq' from incompatible pointer type
我按照其他人说的往irq.h文件添加东西 还是不行
希望哪位能仔细说明一下 3Q 马立马去
|
应该是你的内核版本不匹配,你找一下你的内核的文件定义:IRQ——TYPE——FALLING——EDGM什么的!对照好就行了