[Galaxy S3 Neo Q&A, Help & Troubleshooting] Pavlex4:
I have errors during compiling kernel:

In file included from arch/arm/mach-msm/sec-switch.c:31:0:

include/linux/i2c/fsa9485.h:139:6: error: nested redefinition of 'enum cable_type_t'

include/linux/i2c/fsa9485.h:139:6: error: redeclaration of 'enum cable_type_t'

include/linux/i2c/tsu6721.h:25:6: note: originally defined here

include/linux/i2c/fsa9485.h:140:2: error: redeclaration of enumerator 'CABLE_TYPE_NONE'

include/linux/i2c/tsu6721.h:26:9: note: previous definition of 'CABLE_TYPE_NONE' was here

include/linux/i2c/fsa9485.h:141:2: error: redeclaration of enumerator 'CABLE_TYPE_USB'

include/linux/i2c/tsu6721.h:27:9: note: previous definition of 'CABLE_TYPE_USB' was here

include/linux/i2c/fsa9485.h:142:2: error: redeclaration of enumerator 'CABLE_TYPE_AC'

include/linux/i2c/tsu6721.h:28:9: note: previous definition of 'CABLE_TYPE_AC' was here

include/linux/i2c/fsa9485.h:143:2: error: redeclaration of enumerator 'CABLE_TYPE_MISC'

include/linux/i2c/tsu6721.h:29:9: note: previous definition of 'CABLE_TYPE_MISC' was here

include/linux/i2c/fsa9485.h:144:2: error: redeclaration of enumerator 'CABLE_TYPE_CARDOCK'

include/linux/i2c/tsu6721.h:30:9: note: previous definition of 'CABLE_TYPE_CARDOCK' was here

include/linux/i2c/fsa9485.h:146:2: error: redeclaration of enumerator 'CABLE_TYPE_LANHUB'

include/linux/i2c/tsu6721.h:45:2: note: previous definition of 'CABLE_TYPE_LANHUB' was here

include/linux/i2c/fsa9485.h:148:2: error: redeclaration of enumerator 'CABLE_TYPE_UARTOFF'

include/linux/i2c/tsu6721.h:31:9: note: previous definition of 'CABLE_TYPE_UARTOFF' was here

include/linux/i2c/fsa9485.h:149:2: error: redeclaration of enumerator 'CABLE_TYPE_JIG'

include/linux/i2c/tsu6721.h:32:9: note: previous definition of 'CABLE_TYPE_JIG' was here

include/linux/i2c/fsa9485.h:150:2: error: redeclaration of enumerator 'CABLE_TYPE_UNKNOWN'

include/linux/i2c/tsu6721.h:33:9: note: previous definition of 'CABLE_TYPE_UNKNOWN' was here

include/linux/i2c/fsa9485.h:151:2: error: redeclaration of enumerator 'CABLE_TYPE_CDP'

include/linux/i2c/tsu6721.h:34:9: note: previous definition of 'CABLE_TYPE_CDP' was here

include/linux/i2c/fsa9485.h:152:2: error: redeclaration of enumerator 'CABLE_TYPE_SMART_DOCK'

include/linux/i2c/tsu6721.h:35:9: note: previous definition of 'CABLE_TYPE_SMART_DOCK' was here

include/linux/i2c/fsa9485.h:153:2: error: redeclaration of enumerator 'CABLE_TYPE_OTG'

include/linux/i2c/tsu6721.h:36:9: note: previous definition of 'CABLE_TYPE_OTG' was here

include/linux/i2c/fsa9485.h:154:2: error: redeclaration of enumerator 'CABLE_TYPE_AUDIO_DOCK'

include/linux/i2c/tsu6721.h:37:9: note: previous definition of 'CABLE_TYPE_AUDIO_DOCK' was here

include/linux/i2c/fsa9485.h:158:2: error: redeclaration of enumerator 'CABLE_TYPE_INCOMPATIBLE'

include/linux/i2c/tsu6721.h:41:9: note: previous definition of 'CABLE_TYPE_INCOMPATIBLE' was here

include/linux/i2c/fsa9485.h:159:2: error: redeclaration of enumerator 'CABLE_TYPE_DESK_DOCK'

include/linux/i2c/tsu6721.h:42:9: note: previous definition of 'CABLE_TYPE_DESK_DOCK' was here

arch/arm/mach-msm/sec-switch.c:818:16: error: redefinition of 'midas_switch_show_vbus'

arch/arm/mach-msm/sec-switch.c:226:16: note: previous definition of 'midas_switch_show_vbus' was here

arch/arm/mach-msm/sec-switch.c:838:16: error: redefinition of 'midas_switch_store_vbus'

arch/arm/mach-msm/sec-switch.c:246:16: note: previous definition of 'midas_switch_store_vbus' was here

arch/arm/mach-msm/sec-switch.c:884:1: error: redefinition of 'dev_attr_disable_vbus'

arch/arm/mach-msm/sec-switch.c:292:1: note: previous definition of 'dev_attr_disable_vbus' was here

arch/arm/mach-msm/sec-switch.c:940:21: error: redefinition of 'sec_booster'

arch/arm/mach-msm/sec-switch.c:348:21: note: previous definition of 'sec_booster' was here

arch/arm/mach-msm/sec-switch.c:946:19: error: redefinition of 'midas_sec_switch_init'

arch/arm/mach-msm/sec-switch.c:354:19: note: previous definition of 'midas_sec_switch_init' was here

arch/arm/mach-msm/sec-switch.c:983:5: error: redefinition of 'current_cable_type'

arch/arm/mach-msm/sec-switch.c:391:5: note: previous definition of 'current_cable_type' was here

arch/arm/mach-msm/sec-switch.c: In function 'max77804k_muic_mhl_cb':

arch/arm/mach-msm/sec-switch.c:1235:18: error: 'MAX77804K_MUIC_ATTACHED' undeclared (first use in this function)

arch/arm/mach-msm/sec-switch.c:1235:18: note: each undeclared identifier is reported only once for each function it appears in

arch/arm/mach-msm/sec-switch.c: At top level:

arch/arm/mach-msm/sec-switch.c:1348:8: error: variable 'max77804k_muic' has initializer but incomplete type

arch/arm/mach-msm/sec-switch.c:1349:2: error: unknown field 'usb_cb' specified in initializer

arch/arm/mach-msm/sec-switch.c:1350:2: error: unknown field 'charger_cb' specified in initializer

arch/arm/mach-msm/sec-switch.c:1351:2: error: unknown field 'mhl_cb' specified in initializer

arch/arm/mach-msm/sec-switch.c:1352:2: error: unknown field 'is_mhl_attached' specified in initializer

arch/arm/mach-msm/sec-switch.c:1353:2: error: unknown field 'set_safeout' specified in initializer

arch/arm/mach-msm/sec-switch.c:1354:2: error: unknown field 'init_cb' specified in initializer

arch/arm/mach-msm/sec-switch.c:1355:2: error: unknown field 'dock_cb' specified in initializer

arch/arm/mach-msm/sec-switch.c:1357:2: error: unknown field 'host_notify_cb' specified in initializer

arch/arm/mach-msm/sec-switch.c:1361:2: error: unknown field 'gpio_usb_sel' specified in initializer

arch/arm/mach-msm/sec-switch.c:1362:2: error: unknown field 'jig_state' specified in initializer

arch/arm/mach-msm/sec-switch.c:1365:1: error: redefinition of '__initcall_midas_sec_switch_init6'

arch/arm/mach-msm/sec-switch.c:811:1: note: previous definition of '__initcall_midas_sec_switch_init6' was here

arch/arm/mach-msm/sec-switch.c:1373:16: error: redefinition of 'midas_switch_show_vbus'

arch/arm/mach-msm/sec-switch.c:818:16: note: previous definition of 'midas_switch_show_vbus' was here

arch/arm/mach-msm/sec-switch.c:1393:16: error: redefinition of 'midas_switch_store_vbus'

arch/arm/mach-msm/sec-switch.c:838:16: note: previous definition of 'midas_switch_store_vbus' was here

arch/arm/mach-msm/sec-switch.c:1439:1: error: redefinition of 'dev_attr_disable_vbus'

arch/arm/mach-msm/sec-switch.c:292:1: note: previous definition of 'dev_attr_disable_vbus' was here

arch/arm/mach-msm/sec-switch.c:1497:21: error: redefinition of 'sec_booster'

arch/arm/mach-msm/sec-switch.c:348:21: note: previous definition of 'sec_booster' was here

arch/arm/mach-msm/sec-switch.c:1503:19: error: redefinition of 'midas_sec_switch_init'

arch/arm/mach-msm/sec-switch.c:946:19: note: previous definition of 'midas_sec_switch_init' was here

arch/arm/mach-msm/sec-switch.c:1540:5: error: redefinition of 'current_cable_type'

arch/arm/mach-msm/sec-switch.c:391:5: note: previous definition of 'current_cable_type' was here

arch/arm/mach-msm/sec-switch.c: In function 'max77888_muic_usb_cb':

arch/arm/mach-msm/sec-switch.c:1775:25: error: 'USB_LANHUB_DETACHED' undeclared (first use in this function)

arch/arm/mach-msm/sec-switch.c:1776:18: error: 'USB_LANHUB_ATTACHED' undeclared (first use in this function)

arch/arm/mach-msm/sec-switch.c: In function 'max77888_muic_mhl_cb':

arch/arm/mach-msm/sec-switch.c:1813:18: error: 'MAX77888_MUIC_ATTACHED' undeclared (first use in this function)

arch/arm/mach-msm/sec-switch.c: At top level:

arch/arm/mach-msm/sec-switch.c:1921:8: error: variable 'max77888_muic' has initializer but incomplete type

arch/arm/mach-msm/sec-switch.c:1922:2: error: unknown field 'usb_cb' specified in initializer

arch/arm/mach-msm/sec-switch.c:1923:2: error: unknown field 'charger_cb' specified in initializer

arch/arm/mach-msm/sec-switch.c:1924:2: error: unknown field 'mhl_cb' specified in initializer

arch/arm/mach-msm/sec-switch.c:1925:2: error: unknown field 'is_mhl_attached' specified in initializer

arch/arm/mach-msm/sec-switch.c:1926:2: error: unknown field 'set_safeout' specified in initializer

arch/arm/mach-msm/sec-switch.c:1927:2: error: unknown field 'init_cb' specified in initializer

arch/arm/mach-msm/sec-switch.c:1928:2: error: unknown field 'dock_cb' specified in initializer

arch/arm/mach-msm/sec-switch.c:1930:2: error: unknown field 'host_notify_cb' specified in initializer

arch/arm/mach-msm/sec-switch.c:1934:2: error: unknown field 'gpio_usb_sel' specified in initializer

arch/arm/mach-msm/sec-switch.c:1935:2: error: unknown field 'jig_state' specified in initializer

arch/arm/mach-msm/sec-switch.c:1938:1: error: redefinition of '__initcall_midas_sec_switch_init6'

arch/arm/mach-msm/sec-switch.c:1365:1: note: previous definition of '__initcall_midas_sec_switch_init6' was here

arch/arm/mach-msm/sec-switch.c:1944:5: error: redefinition of 'current_cable_type'

arch/arm/mach-msm/sec-switch.c:391:5: note: previous definition of 'current_cable_type' was here

arch/arm/mach-msm/sec-switch.c:1946:26: error: redefinition of 'switch_dock'

arch/arm/mach-msm/sec-switch.c:127:26: note: previous definition of 'switch_dock' was here

arch/arm/mach-msm/sec-switch.c:1951:1: error: redefinition of '__kcrctab_switch_dev'

arch/arm/mach-msm/sec-switch.c:132:1: note: previous definition of '__kcrctab_switch_dev' was here

arch/arm/mach-msm/sec-switch.c:1951:1: error: redefinition of '__kstrtab_switch_dev'

arch/arm/mach-msm/sec-switch.c:132:1: note: previous definition of '__kstrtab_switch_dev' was here

arch/arm/mach-msm/sec-switch.c:1951:1: error: redefinition of '__ksymtab_switch_dev'

arch/arm/mach-msm/sec-switch.c:132:1: note: previous definition of '__ksymtab_switch_dev' was here

arch/arm/mach-msm/sec-switch.c:2444:5: error: redefinition of 'current_cable_type'

arch/arm/mach-msm/sec-switch.c:391:5: note: previous definition of 'current_cable_type' was here

arch/arm/mach-msm/sec-switch.c:2445:5: error: redefinition of 'msm8930_get_cable_status'

arch/arm/mach-msm/sec-switch.c:1956:5: note: previous definition of 'msm8930_get_cable_status' was here

arch/arm/mach-msm/sec-switch.c:2450:6: error: redefinition of 'sec_bat_is_lpm'

arch/arm/mach-msm/sec-switch.c:1961:6: note: previous definition of 'sec_bat_is_lpm' was here

arch/arm/mach-msm/sec-switch.c:2455:5: error: redefinition of 'sec_bat_get_cable_status'

arch/arm/mach-msm/sec-switch.c:1967:5: note: previous definition of 'sec_bat_get_cable_status' was here

arch/arm/mach-msm/sec-switch.c: In function 'fsa9485_charger_cb':

arch/arm/mach-msm/sec-switch.c:2787:6: error: 'charger_callbacks' undeclared (first use in this function)

arch/arm/mach-msm/sec-switch.c: In function 'fsa9485_in_charger_cb':

arch/arm/mach-msm/sec-switch.c:2837:6: error: 'charger_callbacks' undeclared (first use in this function)

arch/arm/mach-msm/sec-switch.c: At top level:

arch/arm/mach-msm/sec-switch.c:2921:26: error: redefinition of 'switch_dock'

arch/arm/mach-msm/sec-switch.c:1946:26: note: previous definition of 'switch_dock' was here

arch/arm/mach-msm/sec-switch.c: In function 'sm5502_callback':

arch/arm/mach-msm/sec-switch.c:3469:2: error: duplicate case value

arch/arm/mach-msm/sec-switch.c:3392:2: error: previously used here

arch/arm/mach-msm/sec-switch.c:3553:9: error: duplicate case value

arch/arm/mach-msm/sec-switch.c:3550:2: error: previously used here

scripts/Makefile.build:307: recipe for target 'arch/arm/mach-msm/sec-switch.o' failed

make[1]: *** [arch/arm/mach-msm/sec-switch.o] Error 1

Makefile:950: recipe for target 'arch/arm/mach-msm' failed

make: *** [arch/arm/mach-msm] Error 2

make: *** Waiting for unfinished jobs....

drivers/mfd/max77888.c: In function 'max77888_i2c_probe':

drivers/mfd/max77888.c:211:25: error: 'max77888_haptic_pdata' undeclared (first use in this function)

drivers/mfd/max77888.c:211:25: note: each undeclared identifier is reported only once for each function it appears in

scripts/Makefile.build:307: recipe for target 'drivers/mfd/max77888.o' failed

make[2]: *** [drivers/mfd/max77888.o] Error 1

scripts/Makefile.build:443: recipe for target 'drivers/mfd' failed

make[1]: *** [drivers/mfd] Error 2

make[1]: *** Waiting for unfinished jobs....