I get a compile error when compiling a kernel driver.The error info is
Code:
pxa270_gpio_led_drv.c|27 col 70| error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
|| static ssize_t SIMPLE_GPIO_LED_read ( struct file *file, char __user *buf, size_t count, loff_t *offset)
Part of the source file is:
Code:
static ssize_t SIMPLE_GPIO_LED_read ( struct file *file, char __user *buf, size_t count, loff_t *offset)
{
#ifdef OURS_GPIO_LED_DEBUG
printk ("SIMPLE_GPIO_LED_read [ --kernel--]\n");
#endif
return count;
}
The compile command is :
Code:
gcc -c -Wall -O -D__KERNEL__ -DMODULE -I/home/test/Desktop/linux-2.4.21/include pxa270_gpio_led_drv.c -o pxa270_gpio_led_drv.o
Can anyone help me? Thanks.