Driver porting: hello world
Driver porting: hello world
Posted Sep 23, 2004 20:47 UTC (Thu) by Droep (guest, #24946)Parent article: Driver porting: hello world
Hi,
I'm new to "Linux Device Drivers". When I try to compile the given example as shown above, I get the following error messages. The only difference is that I named the file "hello-driver2.c".
Anyone who knows what I did wrong?
*/usr/include/linux/jiffies.h:16: error: parse error before "jiffies_64"
*/usr/include/linux/jiffies.h:20: error: parse error before "get_jiffies_64"
*/usr/include/asm/mmu.h:13: error: field `sem' has incomplete type
*/usr/include/linux/list.h:604:2: warning: #warning "don't include kernel headers in userspace"
*/usr/include/asm-generic/siginfo.h:53: error: size of array `_pad' is too large
*/usr/include/linux/fs_struct.h:9: error: parse error before "rwlock_t"
*/usr/include/linux/fs_struct.h:13: error: parse error before '}' token
*/usr/include/linux/completion.h:15: error: parse error before "wait_queue_head_t"
*/usr/include/linux/completion.h:26: error: dereferencing pointer to incomplete type
*/usr/include/linux/completion.h:27: error: dereferencing pointer to incomplete type
*/usr/include/linux/pid.h:18: error: field `task_list' has incomplete type
*/usr/include/linux/pid.h:19: error: field `hash_chain' has incomplete type
*/usr/include/linux/pid.h:24: error: field `pid_chain' has incomplete type
*/usr/include/linux/sched.h:93: error: parse error before "process_counts"
*/usr/include/linux/timer.h:10: error: field `entry' has incomplete type
*hello-driver2.c:6: error: `KERN_ALERT' undeclared (first use in this function)
*hello-driver2.c:6: error: parse error before string constant
*hello-driver2.c:11: error: `KERN_ALERT' undeclared (first use in this function)
*hello-driver2.c:11: error: parse error before string constant
*hello-driver2.c:14: error: parse error before "__attribute_used__"
*hello-driver2.c:14: warning: initialization makes integer from pointer without a cast
*hello-driver2.c:14: warning: data definition has no type or storage class
*hello-driver2.c:15: error: parse error before "__attribute_used__"
*hello-driver2.c:15: error: redefinition of `__attribute_used__'
*hello-driver2.c:14: error: `__attribute_used__' previously defined here
*hello-driver2.c:15: warning: initialization makes integer from pointer without a cast
*hello-driver2.c:15: warning: data definition has no type or storage class
**** Beƫindigd met status: 2 ***
