Skip to content

Commit 43179db

Browse files
marcanjannau
authored andcommitted
usb: renesas-xhci: Build loader into the main xhci-pci module
This doesn't make any sense as a module, since it becomes a symbol dependency of the main driver if enabled, and therefore would always be loaded regardless of the user's hardware. Just compile it in, if enabled. Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent 0c38364 commit 43179db

5 files changed

Lines changed: 6 additions & 7 deletions

File tree

drivers/usb/host/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ config USB_XHCI_DBGCAP
4040
config USB_XHCI_PCI
4141
tristate
4242
depends on USB_PCI
43-
depends on USB_XHCI_PCI_RENESAS || !USB_XHCI_PCI_RENESAS
4443
default y
4544

4645
config USB_XHCI_PCI_RENESAS
47-
tristate "Support for additional Renesas xHCI controller with firmware"
46+
bool "Support for Renesas xHCI controllers with firmware"
47+
depends on USB_XHCI_PCI
4848
help
4949
Say 'Y' to enable the support for the Renesas xHCI controller with
5050
firmware. Make sure you have the firmware for the device and

drivers/usb/host/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ obj-$(CONFIG_USB_UHCI_HCD) += uhci-hcd.o
6868
obj-$(CONFIG_USB_FHCI_HCD) += fhci.o
6969
obj-$(CONFIG_USB_XHCI_HCD) += xhci-hcd.o
7070
obj-$(CONFIG_USB_XHCI_PCI) += xhci-pci.o
71-
obj-$(CONFIG_USB_XHCI_PCI_RENESAS) += xhci-pci-renesas.o
71+
xhci-pci-y += xhci-pci-core.o
72+
xhci-pci-$(CONFIG_USB_XHCI_PCI_RENESAS) += xhci-pci-renesas.o
7273
obj-$(CONFIG_USB_XHCI_PLATFORM) += xhci-plat-hcd.o
7374
obj-$(CONFIG_USB_XHCI_HISTB) += xhci-histb.o
7475
obj-$(CONFIG_USB_XHCI_RCAR) += xhci-rcar-hcd.o

drivers/usb/host/xhci-pci-renesas.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
#include <linux/acpi.h>
55
#include <linux/firmware.h>
6-
#include <linux/module.h>
76
#include <linux/pci.h>
87
#include <linux/slab.h>
98
#include <asm/unaligned.h>
@@ -625,6 +624,5 @@ int renesas_xhci_check_request_fw(struct pci_dev *pdev,
625624
release_firmware(fw);
626625
return err;
627626
}
628-
EXPORT_SYMBOL_GPL(renesas_xhci_check_request_fw);
629627

630-
MODULE_LICENSE("GPL v2");
628+
MODULE_FIRMWARE("renesas_usb_fw.mem");

drivers/usb/host/xhci-pci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ int renesas_xhci_check_request_fw(struct pci_dev *dev,
99
const struct pci_device_id *id);
1010

1111
#else
12-
static int renesas_xhci_check_request_fw(struct pci_dev *dev,
12+
static inline int renesas_xhci_check_request_fw(struct pci_dev *dev,
1313
const struct pci_device_id *id)
1414
{
1515
return 0;

0 commit comments

Comments
 (0)