I got an error while compiling (or failing to compile as the case was.)
Code:
harry@neo:~/m5602-ov9650$ make
make -C /lib/modules/2.6.27-9-generic/build SUBDIRS=/home/harry/m5602-ov9650 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.27-9-generic'
CC [M] /home/harry/m5602-ov9650/m560x_core.o
/home/harry/m5602-ov9650/m560x_core.c: In function ‘rvmalloc’:
/home/harry/m5602-ov9650/m560x_core.c:66: error: implicit declaration of function ‘PAGE_ALIGN’
/home/harry/m5602-ov9650/m560x_core.c:74: error: implicit declaration of function ‘SetPageReserved’
/home/harry/m5602-ov9650/m560x_core.c:74: error: implicit declaration of function ‘vmalloc_to_page’
/home/harry/m5602-ov9650/m560x_core.c: In function ‘rvfree’:
/home/harry/m5602-ov9650/m560x_core.c:91: error: implicit declaration of function ‘ClearPageReserved’
/home/harry/m5602-ov9650/m560x_core.c: In function ‘m5602_init_from_script’:
/home/harry/m5602-ov9650/m560x_core.c:337: warning: assignment discards qualifiers from pointer target type
/home/harry/m5602-ov9650/m560x_core.c:352: warning: assignment discards qualifiers from pointer target type
/home/harry/m5602-ov9650/m560x_core.c:420: warning: assignment discards qualifiers from pointer target type
/home/harry/m5602-ov9650/m560x_core.c: In function ‘init_from_script’:
/home/harry/m5602-ov9650/m560x_core.c:589: warning: assignment discards qualifiers from pointer target type
/home/harry/m5602-ov9650/m560x_core.c:604: warning: assignment discards qualifiers from pointer target type
/home/harry/m5602-ov9650/m560x_core.c:673: warning: assignment discards qualifiers from pointer target type
/home/harry/m5602-ov9650/m560x_core.c: In function ‘init_hashtab’:
/home/harry/m5602-ov9650/m560x_core.c:812: warning: assignment discards qualifiers from pointer target type
/home/harry/m5602-ov9650/m560x_core.c:827: warning: assignment discards qualifiers from pointer target type
/home/harry/m5602-ov9650/m560x_core.c:851: warning: assignment discards qualifiers from pointer target type
/home/harry/m5602-ov9650/m560x_core.c: At top level:
/home/harry/m5602-ov9650/m560x_core.c:1572: warning: ‘struct class_device’ declared inside parameter list
/home/harry/m5602-ov9650/m560x_core.c:1572: warning: its scope is only this definition or declaration, which is probably not what you want
/home/harry/m5602-ov9650/m560x_core.c: In function ‘show_model’:
/home/harry/m5602-ov9650/m560x_core.c:1572: warning: initialization from incompatible pointer type
/home/harry/m5602-ov9650/m560x_core.c: At top level:
/home/harry/m5602-ov9650/m560x_core.c:1572: error: expected ‘)’ before ‘(’ token
/home/harry/m5602-ov9650/m560x_core.c:1573: warning: ‘struct class_device’ declared inside parameter list
/home/harry/m5602-ov9650/m560x_core.c: In function ‘show_in_use’:
/home/harry/m5602-ov9650/m560x_core.c:1573: warning: initialization from incompatible pointer type
/home/harry/m5602-ov9650/m560x_core.c: At top level:
/home/harry/m5602-ov9650/m560x_core.c:1573: error: expected ‘)’ before ‘(’ token
/home/harry/m5602-ov9650/m560x_core.c:1574: warning: ‘struct class_device’ declared inside parameter list
/home/harry/m5602-ov9650/m560x_core.c: In function ‘show_streaming’:
/home/harry/m5602-ov9650/m560x_core.c:1574: warning: initialization from incompatible pointer type
/home/harry/m5602-ov9650/m560x_core.c: At top level:
/home/harry/m5602-ov9650/m560x_core.c:1574: error: expected ‘)’ before ‘(’ token
/home/harry/m5602-ov9650/m560x_core.c:1575: warning: ‘struct class_device’ declared inside parameter list
/home/harry/m5602-ov9650/m560x_core.c: In function ‘show_palette’:
/home/harry/m5602-ov9650/m560x_core.c:1575: warning: initialization from incompatible pointer type
/home/harry/m5602-ov9650/m560x_core.c: At top level:
/home/harry/m5602-ov9650/m560x_core.c:1575: error: expected ‘)’ before ‘(’ token
/home/harry/m5602-ov9650/m560x_core.c:1576: warning: ‘struct class_device’ declared inside parameter list
/home/harry/m5602-ov9650/m560x_core.c: In function ‘show_frames_total’:
/home/harry/m5602-ov9650/m560x_core.c:1576: warning: initialization from incompatible pointer type
/home/harry/m5602-ov9650/m560x_core.c: At top level:
/home/harry/m5602-ov9650/m560x_core.c:1576: error: expected ‘)’ before ‘(’ token
/home/harry/m5602-ov9650/m560x_core.c:1577: warning: ‘struct class_device’ declared inside parameter list
/home/harry/m5602-ov9650/m560x_core.c: In function ‘show_frames_read’:
/home/harry/m5602-ov9650/m560x_core.c:1577: warning: initialization from incompatible pointer type
/home/harry/m5602-ov9650/m560x_core.c: At top level:
/home/harry/m5602-ov9650/m560x_core.c:1577: error: expected ‘)’ before ‘(’ token
/home/harry/m5602-ov9650/m560x_core.c:1578: warning: ‘struct class_device’ declared inside parameter list
/home/harry/m5602-ov9650/m560x_core.c: In function ‘show_packets_dropped’:
/home/harry/m5602-ov9650/m560x_core.c:1578: warning: initialization from incompatible pointer type
/home/harry/m5602-ov9650/m560x_core.c: At top level:
/home/harry/m5602-ov9650/m560x_core.c:1578: error: expected ‘)’ before ‘(’ token
/home/harry/m5602-ov9650/m560x_core.c:1579: warning: ‘struct class_device’ declared inside parameter list
/home/harry/m5602-ov9650/m560x_core.c: In function ‘show_decoding_errors’:
/home/harry/m5602-ov9650/m560x_core.c:1579: warning: initialization from incompatible pointer type
/home/harry/m5602-ov9650/m560x_core.c: At top level:
/home/harry/m5602-ov9650/m560x_core.c:1579: error: expected ‘)’ before ‘(’ token
/home/harry/m5602-ov9650/m560x_core.c: In function ‘m560x_create_sysfs_files’:
/home/harry/m5602-ov9650/m560x_core.c:1583: error: implicit declaration of function ‘video_device_create_file’
/home/harry/m5602-ov9650/m560x_core.c:1583: error: ‘class_device_attr_model’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1583: error: (Each undeclared identifier is reported only once
/home/harry/m5602-ov9650/m560x_core.c:1583: error: for each function it appears in.)
/home/harry/m5602-ov9650/m560x_core.c:1584: error: ‘class_device_attr_in_use’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1585: error: ‘class_device_attr_streaming’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1586: error: ‘class_device_attr_palette’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1587: error: ‘class_device_attr_frames_total’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1588: error: ‘class_device_attr_frames_read’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1589: error: ‘class_device_attr_packets_dropped’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1590: error: ‘class_device_attr_decoding_errors’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c: In function ‘m560x_remove_sysfs_files’:
/home/harry/m5602-ov9650/m560x_core.c:1595: error: implicit declaration of function ‘video_device_remove_file’
/home/harry/m5602-ov9650/m560x_core.c:1595: error: ‘class_device_attr_model’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1596: error: ‘class_device_attr_in_use’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1597: error: ‘class_device_attr_streaming’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1598: error: ‘class_device_attr_palette’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1599: error: ‘class_device_attr_frames_total’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1600: error: ‘class_device_attr_frames_read’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1601: error: ‘class_device_attr_packets_dropped’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1602: error: ‘class_device_attr_decoding_errors’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c: At top level:
/home/harry/m5602-ov9650/m560x_core.c:1624: error: variable ‘m560x_vm_ops’ has initializer but incomplete type
/home/harry/m5602-ov9650/m560x_core.c:1625: error: unknown field ‘open’ specified in initializer
/home/harry/m5602-ov9650/m560x_core.c:1625: warning: excess elements in struct initializer
/home/harry/m5602-ov9650/m560x_core.c:1625: warning: (near initialization for ‘m560x_vm_ops’)
/home/harry/m5602-ov9650/m560x_core.c:1626: error: unknown field ‘close’ specified in initializer
/home/harry/m5602-ov9650/m560x_core.c:1626: warning: excess elements in struct initializer
/home/harry/m5602-ov9650/m560x_core.c:1626: warning: (near initialization for ‘m560x_vm_ops’)
/home/harry/m5602-ov9650/m560x_core.c: In function ‘v4l_m560x_mmap’:
/home/harry/m5602-ov9650/m560x_core.c:1935: error: ‘VM_WRITE’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1951: error: ‘VM_IO’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1952: error: ‘VM_RESERVED’ undeclared (first use in this function)
/home/harry/m5602-ov9650/m560x_core.c:1956: error: implicit declaration of function ‘vmalloc_to_pfn’
/home/harry/m5602-ov9650/m560x_core.c:1957: error: implicit declaration of function ‘remap_pfn_range’
/home/harry/m5602-ov9650/m560x_core.c: In function ‘usb_m560x_probe’:
/home/harry/m5602-ov9650/m560x_core.c:2791: error: ‘struct video_device’ has no member named ‘owner’
/home/harry/m5602-ov9650/m560x_core.c:2792: error: ‘struct video_device’ has no member named ‘type’
make[2]: *** [/home/harry/m5602-ov9650/m560x_core.o] Error 1
make[1]: *** [_module_/home/harry/m5602-ov9650] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.27-9-generic'
make: *** [all] Error 2
harry@neo:~/m5602-ov9650$
please help, I want to get this working, so that I can say that every single piece of hardware in my laptop works with ubuntu.
Bookmarks