implicit declaration of function 's3c2410_gpio_cfgpin"的解决办法
2011-10-21 23:35
686 查看
在添加触屏驱动的时候,提示下面的错误:
drivers/input/touchscreen/s3c2410_ts.c: In function 's3c2410_ts_connect':
drivers/input/touchscreen/s3c2410_ts.c:38: error: implicit declaration of function 's3c2410_gpio_cfgpin'
drivers/input/touchscreen/s3c2410_ts.c: In function 'touch_timer_fire':
drivers/input/touchscreen/s3c2410_ts.c:89: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:89: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c: In function 'stylus_action':
drivers/input/touchscreen/s3c2410_ts.c:143: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:143: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:172:67: warning: backslash and newline separated by space
drivers/input/touchscreen/s3c2410_ts.c: In function 's3c2410ts_init':
drivers/input/touchscreen/s3c2410_ts.c:175: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:175: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:187: warning: left shift count >= width of type
make[3]: *** [drivers/input/touchscreen/s3c2410_ts.o] 错误 1
make[2]: *** [drivers/input/touchscreen] 错误 2
make[1]: *** [drivers/input] 错误 2
make: *** [drivers] 错误 2
解决办法:
添加一个头文件为#include <linux/gpio.h>
因为在2.6.32内核中,s3c2410_gpio_cfgpin是在include/linux/gpio.h中定义的,所以要添加#include <linux/gpio.h>
drivers/input/touchscreen/s3c2410_ts.c: In function 's3c2410_ts_connect':
drivers/input/touchscreen/s3c2410_ts.c:38: error: implicit declaration of function 's3c2410_gpio_cfgpin'
drivers/input/touchscreen/s3c2410_ts.c: In function 'touch_timer_fire':
drivers/input/touchscreen/s3c2410_ts.c:89: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:89: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c: In function 'stylus_action':
drivers/input/touchscreen/s3c2410_ts.c:143: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:143: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:172:67: warning: backslash and newline separated by space
drivers/input/touchscreen/s3c2410_ts.c: In function 's3c2410ts_init':
drivers/input/touchscreen/s3c2410_ts.c:175: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:175: error: stray '\' in program
drivers/input/touchscreen/s3c2410_ts.c:187: warning: left shift count >= width of type
make[3]: *** [drivers/input/touchscreen/s3c2410_ts.o] 错误 1
make[2]: *** [drivers/input/touchscreen] 错误 2
make[1]: *** [drivers/input] 错误 2
make: *** [drivers] 错误 2
解决办法:
添加一个头文件为#include <linux/gpio.h>
因为在2.6.32内核中,s3c2410_gpio_cfgpin是在include/linux/gpio.h中定义的,所以要添加#include <linux/gpio.h>
相关文章推荐
- 内核error: implicit declaration of function 'irq_to_gpio' 解决方法
- implicit declaration of function 'kzalloc' 解决方法
- 移植出错:eeti_ts.c:64: error: implicit declaration of function 'irq_to_gpio'
- error:implicit declaration of function "irq_to_gpio"
- 如何解决warning:implicit declaration of function 'xxx'
- drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio'
- 解决warning:implicit declaration of function 'Xil_Out32' [-Wimplicit-function-declaration]
- implicit declaration of function 'asprintf' 警告的解决
- drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio'
- Implicit delcaration of function 'sysctlbyname'is invalid in c99 问题及解决办法
- 编译飞凌ok335D开发板内核时出现drivers/mfd/ezx-pcap.c:205:2: error: implicit declaration of function 'irq_to_gpio
- 编译海思3520内核时候报错drivers/mfd/ezx-pcap.c:205:2: error: implicit declaration of function 'irq_to_gpio' [-
- Linux 编程 出现警告warning: implicit declaration of function 'pread'('pwrite')
- warning incompatible implicit declaration of built-in function 'printf'
- Implicit declaration of function 'NSFileTypeForHFSTypeCode' is invalid in C99
- implicit declaration of function 'KBUILD_STR' 错误
- incompatible implicit declaration of built-in function 'malloc'
- Implicit Declaration of function 'glBindVertexArrayOES' is invalid in c99
- error: implicit declaration of function 'posix_memalign' [-Werror=implicit-function-declaration]
- error: implicit declaration of function 'kmalloc'