Skip to content

Commit b48cb02

Browse files
jysnpsFelipe Balbi
authored andcommitted
usb: dwc2: pci: Correctly compile dwc2-pci as a module or built-in
The dwc2-pci driver should be compiled as a module when configured to do so. If the dwc2-pci is configured as a module but actually built-in, it can cause build errors due to the fact that the generic-phy will be allowed to compile as a module causing undefined references. Reported-by: Alan Cox <[email protected]> Signed-off-by: John Youn <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
1 parent 3463d79 commit b48cb02

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/usb/dwc2/Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,8 @@ endif
1919
# mode. The PCI bus interface module will called dwc2_pci.ko and the platform
2020
# interface module will be called dwc2_platform.ko.
2121

22-
ifneq ($(CONFIG_USB_DWC2_PCI),)
23-
obj-$(CONFIG_USB_DWC2) += dwc2_pci.o
24-
dwc2_pci-y := pci.o
25-
endif
22+
obj-$(CONFIG_USB_DWC2_PCI) += dwc2_pci.o
23+
dwc2_pci-y := pci.o
2624

2725
obj-$(CONFIG_USB_DWC2_PLATFORM) += dwc2_platform.o
2826
dwc2_platform-y := platform.o

0 commit comments

Comments
 (0)