About USB gadget error

I rebuild the kernel uImage,

add some kernel configuration see below list

USB Support —> Remove “USB Mass Storage support”

Add “USB Gadget Support → USB Gadget Drivers (HID Gadget)”

Then make the kernel, but get below error message
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: include/generated/mach-types.h' is up to date. CALL scripts/checksyscalls.sh CHK include/generated/compile.h GZIP kernel/config_data.gz CHK kernel/config_data.h LD drivers/usb/gadget/built-in.o drivers/usb/gadget/g_dbgp.o: In function usb_ep_autoconfig’:
dbgp.c:(.text+0xb84): multiple definition of usb_ep_autoconfig' drivers/usb/gadget/g_hid.o:hid.c:(.text+0x334c): first defined here drivers/usb/gadget/g_dbgp.o: In function usb_ep_autoconfig_reset’:
dbgp.c:(.text+0xb9c): multiple definition of usb_ep_autoconfig_reset' drivers/usb/gadget/g_hid.o:hid.c:(.text+0x3364): first defined here drivers/usb/gadget/g_dbgp.o: In function usb_ep_autoconfig_ss’:
dbgp.c:(.text+0xa10): multiple definition of `usb_ep_autoconfig_ss’
drivers/usb/gadget/g_hid.o:hid.c:(.text+0x31d8): first defined here
make[3]: *** [drivers/usb/gadget/built-in.o] Error 1
make[2]: *** [drivers/usb/gadget] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error

does anyone have solution?


Best regards,