implicit declaration of function 's3c2410_gpio_cfgpin"的解决办法

来源:互联网 发布:美国圣昆丁监狱 编程 编辑:程序博客网 时间:2024/06/06 03:06
 

在添加触屏驱动的时候,提示下面的错误:

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>

原创粉丝点击