|
错误是:
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))
请问是什么问题呢?如何修改呢? |
|