summaryrefslogtreecommitdiff
path: root/drivers/usb/host/ehci-hub.c
diff options
context:
space:
mode:
authorJack Pham <jackp@codeaurora.org>2013-08-14 00:40:13 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-14 23:18:26 +0400
commit726a85caa30201eaadb993397a3e8ec23949c608 (patch)
tree94b1332a3df2540c251fdcf04d3ebabc227a854b /drivers/usb/host/ehci-hub.c
parent034d1527adebd302115c87ef343497a889638275 (diff)
downloadlinux-726a85caa30201eaadb993397a3e8ec23949c608.tar.xz
usb: host: add Kconfig option for EHSET
commit 9841f37a1c ("usb: ehci: Add support for SINGLE_STEP_SET_FEATURE test of EHSET") added additional code to the EHCI hub driver but it is anticipated to only have a limited audience (e.g. embedded silicon vendors and integrators). Avoid subjecting all EHCI (and in the future maybe xHCI/OHCI, etc.) HCD users to code bloat by conditionally compiling the EHSET-specific additions with a new Kconfig option, CONFIG_USB_HCD_TEST_MODE. Signed-off-by: Jack Pham <jackp@codeaurora.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/ehci-hub.c')
-rw-r--r--drivers/usb/host/ehci-hub.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/usb/host/ehci-hub.c b/drivers/usb/host/ehci-hub.c
index f8b215fa0d93..3bf9f482710c 100644
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -712,6 +712,8 @@ ehci_hub_descriptor (
}
/*-------------------------------------------------------------------------*/
+#ifdef CONFIG_USB_HCD_TEST_MODE
+
#define EHSET_TEST_SINGLE_STEP_SET_FEATURE 0x06
static void usb_ehset_completion(struct urb *urb)
@@ -847,6 +849,7 @@ cleanup:
kfree(buf);
return retval;
}
+#endif /* CONFIG_USB_HCD_TEST_MODE */
/*-------------------------------------------------------------------------*/
static int ehci_hub_control (
@@ -1222,13 +1225,16 @@ static int ehci_hub_control (
* about the EHCI-specific stuff.
*/
case USB_PORT_FEAT_TEST:
+#ifdef CONFIG_USB_HCD_TEST_MODE
if (selector == EHSET_TEST_SINGLE_STEP_SET_FEATURE) {
spin_unlock_irqrestore(&ehci->lock, flags);
retval = ehset_single_step_set_feature(hcd,
wIndex);
spin_lock_irqsave(&ehci->lock, flags);
break;
- } else if (!selector || selector > 5)
+ }
+#endif
+ if (!selector || selector > 5)
goto error;
spin_unlock_irqrestore(&ehci->lock, flags);
ehci_quiesce(ehci);