- 论坛徽章:
- 0
|
想通过lm-sensors来检测系统的运行的状态,比如风扇,温度等,但是主板上面的使用的风扇的控制芯片是ADT7475,本机安装的操作系统为RHEL5.4 64位版本,内核的版本为2.6.18-164.el5,在这版本的内核下,还不支持该芯片,所以从http://www.lm-sensors.org/wiki/Devices上面下载了AD7475的芯片驱动的源码进行编译,编译出现了错误,详细的信息如下,本人对驱动和C程序不熟悉,请各位帮忙看看,看有什么法子可以解决这个问题,非常感谢
编译出错的详细的信息:
[root@localhost adt7475]# make
CC [M] /adt7475/adt7475.o
/adt7475/adt7475.c:154: warning: initialization makes integer from pointer without a cast
/adt7475/adt7475.c:154: error: initializer element is not computable at load time
/adt7475/adt7475.c:154: error: (near initialization for 'adt7475_id[0].id')
/adt7475/adt7475.c:154: warning: excess elements in struct initializer
/adt7475/adt7475.c:154: warning: (near initialization for 'adt7475_id[0]')
/adt7475/adt7475.c:155: warning: initialization makes integer from pointer without a cast
/adt7475/adt7475.c:155: error: initializer element is not computable at load time
/adt7475/adt7475.c:155: error: (near initialization for 'adt7475_id[1].id')
/adt7475/adt7475.c:155: warning: excess elements in struct initializer
/adt7475/adt7475.c:155: warning: (near initialization for 'adt7475_id[1]')
/adt7475/adt7475.c:156: warning: initialization makes integer from pointer without a cast
/adt7475/adt7475.c:156: error: initializer element is not computable at load time
/adt7475/adt7475.c:156: error: (near initialization for 'adt7475_id[2].id')
/adt7475/adt7475.c:156: warning: excess elements in struct initializer
/adt7475/adt7475.c:156: warning: (near initialization for 'adt7475_id[2]')
/adt7475/adt7475.c:157: warning: initialization makes integer from pointer without a cast
/adt7475/adt7475.c:157: error: initializer element is not computable at load time
/adt7475/adt7475.c:157: error: (near initialization for 'adt7475_id[3].id')
/adt7475/adt7475.c:157: warning: excess elements in struct initializer
/adt7475/adt7475.c:157: warning: (near initialization for 'adt7475_id[3]')
/adt7475/adt7475.c: In function 'reg2volt':
/adt7475/adt7475.c:259: error: implicit declaration of function 'DIV_ROUND_CLOSEST'
/adt7475/adt7475.c: In function 'set_voltage':
/adt7475/adt7475.c:346: error: implicit declaration of function 'strict_strtol'
/adt7475/adt7475.c: In function 'set_tach':
/adt7475/adt7475.c:605: error: implicit declaration of function 'strict_strtoul'
/adt7475/adt7475.c: At top level:
/adt7475/adt7475.c:1176: warning: 'struct i2c_board_info' declared inside parameter list
/adt7475/adt7475.c:1176: warning: its scope is only this definition or declaration, which is probably not what you want
/adt7475/adt7475.c: In function 'adt7475_detect':
/adt7475/adt7475.c:1207: error: dereferencing pointer to incomplete type
/adt7475/adt7475.c:1207: error: request for member 'type' in something not a structure or union
/adt7475/adt7475.c:1207: warning: passing argument 1 of 'strlcpy' from incompatible pointer type
/adt7475/adt7475.c: In function 'adt7475_probe':
/adt7475/adt7475.c:1254: error: 'const struct i2c_device_id' has no member named 'driver_data'
/adt7475/adt7475.c:1275: error: 'const struct i2c_device_id' has no member named 'driver_data'
/adt7475/adt7475.c:1275: warning: comparison between pointer and integer
/adt7475/adt7475.c:1286: error: 'const struct i2c_device_id' has no member named 'driver_data'
/adt7475/adt7475.c:1286: warning: comparison between pointer and integer
/adt7475/adt7475.c:1291: error: 'const struct i2c_device_id' has no member named 'driver_data'
/adt7475/adt7475.c:1291: warning: comparison between pointer and integer
/adt7475/adt7475.c:1291: error: 'const struct i2c_device_id' has no member named 'driver_data'
/adt7475/adt7475.c:1291: warning: comparison between pointer and integer
/adt7475/adt7475.c:1299: error: 'const struct i2c_device_id' has no member named 'driver_data'
/adt7475/adt7475.c:1299: warning: comparison between pointer and integer
/adt7475/adt7475.c:1364: warning: assignment from incompatible pointer type
/adt7475/adt7475.c:1370: error: 'const struct i2c_device_id' has no member named 'driver_data'
/adt7475/adt7475.c:1370: error: array subscript is not an integer
/adt7475/adt7475.c:1370: warning: format '%s' expects type 'char *', but argument 4 has type 'const struct i2c_device_id *'
/adt7475/adt7475.c: In function 'adt7475_remove':
/adt7475/adt7475.c:1399: warning: passing argument 1 of 'hwmon_device_unregister' from incompatible pointer type
/adt7475/adt7475.c: At top level:
/adt7475/adt7475.c:1411: error: unknown field 'probe' specified in initializer
/adt7475/adt7475.c:1411: warning: missing braces around initializer
/adt7475/adt7475.c:1411: warning: (near initialization for 'adt7475_driver.list')
/adt7475/adt7475.c:1411: warning: initialization from incompatible pointer type
/adt7475/adt7475.c:1412: error: unknown field 'remove' specified in initializer
/adt7475/adt7475.c:1412: warning: excess elements in struct initializer
/adt7475/adt7475.c:1412: warning: (near initialization for 'adt7475_driver')
/adt7475/adt7475.c:1413: error: unknown field 'id_table' specified in initializer
/adt7475/adt7475.c:1413: warning: excess elements in struct initializer
/adt7475/adt7475.c:1413: warning: (near initialization for 'adt7475_driver')
/adt7475/adt7475.c:1414: error: unknown field 'detect' specified in initializer
/adt7475/adt7475.c:1414: warning: excess elements in struct initializer
/adt7475/adt7475.c:1414: warning: (near initialization for 'adt7475_driver')
/adt7475/adt7475.c:1415: error: unknown field 'address_data' specified in initializer
/adt7475/adt7475.c:1415: warning: excess elements in struct initializer
/adt7475/adt7475.c:1415: warning: (near initialization for 'adt7475_driver')
make[2]: *** [/adt7475/adt7475.o] Error 1
make[1]: *** [_module_/adt7475] Error 2
make: *** [modules] Error 2
编译使用的Makefile和源代码
驱动源代码.rar
(9.2 KB, 下载次数: 34)
|
|