diff --git a/drivers/usb/cdns3/Makefile b/drivers/usb/cdns3/Makefile index 01a9a9620044..3f9b7fa8a594 100644 --- a/drivers/usb/cdns3/Makefile +++ b/drivers/usb/cdns3/Makefile @@ -6,8 +6,13 @@ CFLAGS_cdnsp-trace.o := -I$(src) cdns-usb-common-y := core.o drd.o cdns3-y := cdns3-plat.o -obj-$(CONFIG_USB_CDNS3) += cdns3.o +ifeq ($(CONFIG_USB),m) +obj-m += cdns-usb-common.o +obj-m += cdns3.o +else obj-$(CONFIG_USB_CDNS_SUPPORT) += cdns-usb-common.o +obj-$(CONFIG_USB_CDNS3) += cdns3.o +endif cdns-usb-common-$(CONFIG_USB_CDNS_HOST) += host.o cdns3-$(CONFIG_USB_CDNS3_GADGET) += cdns3-gadget.o cdns3-ep0.o