drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio'
2014-07-18 13:34
507 查看
drivers/input/touchscreen/eeti_ts.c: In function 'eeti_ts_irq_active':
drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio'
make[3]: *** [drivers/input/touchscreen/eeti_ts.o] Error 1
make[2]: *** [drivers/input/touchscreen] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
方法:
更改的地方总共包括三个文件
arch/arm/mach-pxa/raumfeld.c | 1 +
drivers/input/touchscreen/eeti_ts.c | 8 +++++---
include/linux/input/eeti_ts.h | 1 +
1、raumfeld.c
static struct eeti_ts_platform_data eeti_ts_pdata = {
.irq_active_high = 1,
.gpio = GPIO_TOUCH_IRQ,//添加
};
2、/drivers/input/touchscreen/eeti_ts.c
struct eeti_ts_priv {
struct input_dev *input;
struct work_struct work;
struct mutex mutex;
int irq, irq_active_high;//删除
int irq, gpio, irq_active_high;//添加
};
static inline int eeti_ts_irq_active(struct eeti_ts_priv *priv)
{
return gpio_get_value(irq_to_gpio(priv->irq)) == priv->irq_active_high;//删除
return gpio_get_value(priv->gpio) == priv->irq_active_high;//添加
}
static int __devinit eeti_ts_probe(struct i2c_client *client,
pdata = client->dev.platform_data;
下面两句
==========================================
if (pdata)
priv->irq_active_high = pdata->irq_active_high;
============================================
替换为
==========================================
if (pdata) {
priv->gpio = pdata->gpio;
priv->irq_active_high = pdata->irq_active_high;
}
===============================================
3、/include/linux/input/eeti_ts.h
struct eeti_ts_platform_data {
unsigned int irq_active_high;
unsigned int gpio;//添加
};
drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio'
make[3]: *** [drivers/input/touchscreen/eeti_ts.o] Error 1
make[2]: *** [drivers/input/touchscreen] Error 2
make[1]: *** [drivers/input] Error 2
make: *** [drivers] Error 2
方法:
更改的地方总共包括三个文件
arch/arm/mach-pxa/raumfeld.c | 1 +
drivers/input/touchscreen/eeti_ts.c | 8 +++++---
include/linux/input/eeti_ts.h | 1 +
1、raumfeld.c
static struct eeti_ts_platform_data eeti_ts_pdata = {
.irq_active_high = 1,
.gpio = GPIO_TOUCH_IRQ,//添加
};
2、/drivers/input/touchscreen/eeti_ts.c
struct eeti_ts_priv {
struct input_dev *input;
struct work_struct work;
struct mutex mutex;
int irq, irq_active_high;//删除
int irq, gpio, irq_active_high;//添加
};
static inline int eeti_ts_irq_active(struct eeti_ts_priv *priv)
{
return gpio_get_value(irq_to_gpio(priv->irq)) == priv->irq_active_high;//删除
return gpio_get_value(priv->gpio) == priv->irq_active_high;//添加
}
static int __devinit eeti_ts_probe(struct i2c_client *client,
pdata = client->dev.platform_data;
下面两句
==========================================
if (pdata)
priv->irq_active_high = pdata->irq_active_high;
============================================
替换为
==========================================
if (pdata) {
priv->gpio = pdata->gpio;
priv->irq_active_high = pdata->irq_active_high;
}
===============================================
3、/include/linux/input/eeti_ts.h
struct eeti_ts_platform_data {
unsigned int irq_active_high;
unsigned int gpio;//添加
};
相关文章推荐
- drivers/input/touchscreen/eeti_ts.c:65:2: error: implicit declaration of function 'irq_to_gpio'
- 移植出错:eeti_ts.c:64: error: implicit declaration of function 'irq_to_gpio'
- 编译飞凌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' [-
- 内核error: implicit declaration of function 'irq_to_gpio' 解决方法
- hi3520d开发板内核编译出现drivers/mfd/ezx-pcap.c:213: error: implicit declaration of function 'irq_to_gpio'
- error:implicit declaration of function "irq_to_gpio"
- drivers/mfd/ezx-pcap.c:214: error: implicit declaration of function 'irq_to_gpio'
- 移植linux-2.6.38出现 error: implicit declaration of function 'irq_to_gpio'
- error: implicit declaration of function 'gettimeofday'
- error: implicit declaration of function '********'
- implicit declaration of function 's3c2410_gpio_cfgpin"的解决办法
- error: implicit declaration of function 'posix_memalign' [-Werror=implicit-function-declaration]
- error: implicit declaration of function 'class_device_create' error: implicit declaration of functio
- Semantic Issue: Implicit declaration of function 'SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO' is invali
- error: implicit declaration of function 'kmalloc'
- error: implicit declaration of function 'xxx'
- xCode中去除“Implicit declaration of function 'sysctl' is invalid in C99” 警告
- implicit declaration of function 'i2c_transfer'
- Implicit Declaration of function 'glBindVertexArrayOES' is invalid in c99