LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 986|回复: 0

求助:结构体定义错误

[复制链接]
发表于 2008-12-18 21:51:34 | 显示全部楼层 |阅读模式
错误是:
KeyLed.c:99: initializer element is not constant
KeyLed.c:99: (near initialization for `led_local[0].eint')
KeyLed.c:100: initializer element is not constant
KeyLed.c:100: (near initialization for `led_local[1].eint')
KeyLed.c:101: initializer element is not constant
KeyLed.c:101: (near initialization for `led_local[2].eint')
KeyLed.c:102: initializer element is not constant
KeyLed.c:102: (near initialization for `led_local[3].eint')

程序代码:
struct led_local
{
    unsigned long eint;
    void (*interrupt)(int irq, void *dev_id, struct pt_regs *regs);
    unsigned long sa;
    char *device;
};
       
struct led_local led_local[LED_NR] =
{
       
{pISR_EINT4567, led_interrupt, SA_INTERRUPT, "led1"},
{pISR_EINT4567, led_interrupt, SA_INTERRUPT, "led2"},
{pISR_EINT4567, led_interrupt, SA_INTERRUPT, "led3"},
{pISR_EINT4567, led_interrupt, SA_INTERRUPT, "AllLed"},

};
而#define pISR_EINT4567 (*(unsigned *)(_IRQ_BASEADDRESS+0x154))//0x74))

请问是什么问题呢?如何修改呢?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表