Commit d99e65bd authored by Jan Beulich's avatar Jan Beulich Committed by Greg Kroah-Hartman

USB: fix build with XEN and EARLY_PRINTK_DBGP enabled but USB_SUPPORT disabled

Since there's no possible caller of dbgp_external_startup() and
dbgp_reset_prep() when !USB_EHCI_HCD, there's no point in building and
exporting these functions in that case. This eliminates a build error
under the conditions listed in the subject, introduced with the merge
f1c6872e.
Reported-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarJan Beulich <jbeulich@suse.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8e493ca1
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/usb/ehci_def.h> #include <linux/usb/ehci_def.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/serial_core.h> #include <linux/serial_core.h>
#include <linux/kconfig.h>
#include <linux/kgdb.h> #include <linux/kgdb.h>
#include <linux/kthread.h> #include <linux/kthread.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -614,12 +615,6 @@ static int _dbgp_external_startup(void) ...@@ -614,12 +615,6 @@ static int _dbgp_external_startup(void)
return -ENODEV; return -ENODEV;
} }
int dbgp_external_startup(struct usb_hcd *hcd)
{
return xen_dbgp_external_startup(hcd) ?: _dbgp_external_startup();
}
EXPORT_SYMBOL_GPL(dbgp_external_startup);
static int ehci_reset_port(int port) static int ehci_reset_port(int port)
{ {
u32 portsc; u32 portsc;
...@@ -979,6 +974,7 @@ struct console early_dbgp_console = { ...@@ -979,6 +974,7 @@ struct console early_dbgp_console = {
.index = -1, .index = -1,
}; };
#if IS_ENABLED(CONFIG_USB_EHCI_HCD)
int dbgp_reset_prep(struct usb_hcd *hcd) int dbgp_reset_prep(struct usb_hcd *hcd)
{ {
int ret = xen_dbgp_reset_prep(hcd); int ret = xen_dbgp_reset_prep(hcd);
...@@ -1007,6 +1003,13 @@ int dbgp_reset_prep(struct usb_hcd *hcd) ...@@ -1007,6 +1003,13 @@ int dbgp_reset_prep(struct usb_hcd *hcd)
} }
EXPORT_SYMBOL_GPL(dbgp_reset_prep); EXPORT_SYMBOL_GPL(dbgp_reset_prep);
int dbgp_external_startup(struct usb_hcd *hcd)
{
return xen_dbgp_external_startup(hcd) ?: _dbgp_external_startup();
}
EXPORT_SYMBOL_GPL(dbgp_external_startup);
#endif /* USB_EHCI_HCD */
#ifdef CONFIG_KGDB #ifdef CONFIG_KGDB
static char kgdbdbgp_buf[DBGP_MAX_PACKET]; static char kgdbdbgp_buf[DBGP_MAX_PACKET];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment