主题 : android移植2440触摸屏问题 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 42118
精华: 0
发帖: 19
金钱: 95 两
威望: 19 点
贡献值: 0 点
综合积分: 38 分
注册时间: 2011-04-04
最后登录: 2012-07-27
楼主  发表于: 2011-04-18 17:55

 android移植2440触摸屏问题

android移植2440触摸屏问题
编译内核的时候出现这个
drivers/input/tsdev.c:654:warning: left shift count >= width of type

drivers/input/touchscreen/EmbedSky_ts.c:294:warning:ISO C90 forbids mixed declarations and code
警告  
第一个警告的代码如下:

static const struct input_device_id tsdev_ids[] = {
        {
              .flags    = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT | INPUT_DEVICE
_ID_MATCH_RELBIT,
              .evbit    = { BIT(EV_KEY) | BIT(EV_REL) },
              .keybit   = { [BTN_LEFT/32] = BIT(BTN_LEFT) },              .relbit   = { BIT(REL_X) | BIT(REL_Y) },
        }, /* A mouse like device, at least one button, two relative axes */

        {
              .flags    = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT | INPUT_DEVICE
_ID_MATCH_ABSBIT,
              .evbit    = { BIT(EV_KEY) | BIT(EV_ABS) },
              .keybit   = { [BTN_TOUCH/32] = BIT(BTN_TOUCH) },              .absbit   = { BIT(ABS_X) | BIT(ABS_Y) },
        }, /* A tablet like device, at least touch detection, two absolute axes */

        {
              .flags    = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
              .evbit    = { BIT(EV_ABS) },
              .absbit   = { BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE) },
        }, /* A tablet like device with several gradations of pressure */

        {} /* Terminating entry */