| 
 | 
 
 Edited by acsoftlutions at 2019-2-21 04:28  
 
few errors at CC file ltr559.c,   undeclared constanst CUST_EINT_ALS_NUM,  GPIO_ALS_EINT_PIN_M_EINT, GPIO_ALS_EINT_PIN 
 
that constats are not declared in #include <cust_eint.h> 
I did a search inside every file of sdk code and not found  
 
 
Error Log 
 
CC      mediatek/custom/out/kernel/alsps/ltr559.o 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:196:2: warning: initialization from incompatible pointer type [enabled by default] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:196:2: warning: (near initialization for 'ltr559_i2c_driver.detect') [enabled by default] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_dynamic_calibrate': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:330:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:272:6: warning: unused variable 'idx_table' [-Wunused-variable] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:270:6: warning: unused variable 'err' [-Wunused-variable] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:269:6: warning: unused variable 'len' [-Wunused-variable] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:264:6: warning: unused variable 'ret' [-Wunused-variable] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_show_als': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:347:5: warning: unused variable 'dat' [-Wunused-variable] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_store_reg': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:449:2: warning: format '%x' expects argument of type 'unsigned int *', but argument 3 has type 'u8 *' [-Wformat] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: At top level: 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:469:8: warning: initialization from incompatible pointer type [enabled by default] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:469:8: warning: (near initialization for 'driver_attr_status.store') [enabled by default] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:470:8: warning: initialization from incompatible pointer type [enabled by default] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:470:8: warning: (near initialization for 'driver_attr_reg.show') [enabled by default] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:470:8: warning: initialization from incompatible pointer type [enabled by default] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:470:8: warning: (near initialization for 'driver_attr_reg.store') [enabled by default] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_create_attr': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:497:3: warning: passing argument 1 of 'driver_create_file' from incompatible pointer type [enabled by default] 
In file included from /opt/AndroidCode/code/kernel/include/linux/i2c.h:33:0, 
                 from /opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:17: 
/opt/AndroidCode/code/kernel/include/linux/device.h:260:25: note: expected 'struct device_driver *' but argument is of type 'struct driver_attribute *' 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:497:3: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: At top level: 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:531:12: warning: function declaration isn't a prototype [-Wstrict-prototypes] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_ps_set_thres': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:535:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_ps_enable': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:695:17: error: 'CUST_EINT_ALS_NUM' undeclared (first use in this function) 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:695:17: note: each undeclared identifier is reported only once for each function it appears in 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:631:18: warning: unused variable 'sensor_data' [-Wunused-variable] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_ps_disable': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:756:16: error: 'CUST_EINT_ALS_NUM' undeclared (first use in this function) 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_eint_func': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:968:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_setup_eint': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:985:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:988:18: error: 'GPIO_ALS_EINT_PIN' undeclared (first use in this function) 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:989:38: error: 'GPIO_ALS_EINT_PIN_M_EINT' undeclared (first use in this function) 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:998:26: error: 'CUST_EINT_ALS_NUM' undeclared (first use in this function) 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_check_and_clear_intr': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:1045:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_check_intr': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:1118:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_get_ps_value': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:1328:12: warning: unused variable 'mask' [-Wunused-variable] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_eint_work': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:1537:17: error: 'CUST_EINT_ALS_NUM' undeclared (first use in this function) 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: At top level: 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:1728:2: warning: initialization from incompatible pointer type [enabled by default] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:1728:2: warning: (near initialization for 'ltr559_fops.unlocked_ioctl') [enabled by default] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:485:12: note: expected 'struct driver_attribute *' but argument is of type 'struct device_driver *' 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:2106:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:2124:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:2133:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:2158:2: warning: label 'exit_kfree' defined but not used [-Wunused-label] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: In function 'ltr559_i2c_remove': 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:2176:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:2181:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c: At top level: 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:90:12: warning: 'ltr559_i2c_suspend' declared 'static' but never defined [-Wunused-function] 
/opt/AndroidCode/code/kernel/mediatek/custom/out/kernel/alsps/ltr559.c:91:12: warning: 'ltr559_i2c_resume' declared 'static' but never defined [-Wunused-function] 
make[5]: *** [mediatek/custom/out/kernel/alsps/ltr559.o] Error 1 
make[4]: *** [mediatek/custom/out/kernel] Error 2 
make[3]: *** [sub-make] Error 2 
 
OS building: Linux Ubuntu 12.04 64bit 
jdk version: jdk1.6.0_31 
JAVA_HOME=/usr/lib/jvm/jdk1.6.0_31 
 
regards!! 
 
 
 |   
 
 
 
 |