aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
authorMichal Nazarewicz <mina86@mina86.com>2012-08-24 14:46:18 -0400
committerFelipe Balbi <balbi@ti.com>2012-08-31 05:49:40 -0400
commit85b8614d722389202af298e1bf8a599c431fef19 (patch)
tree45eeda8dbd200d26dd044dab4417292e3d687c92 /include/linux/usb
parent86bab36662d47388102ca437a3cbfd79e0ea75cd (diff)
usb: gadget: get rid of USB_GADGET_{DUAL,SUPER}SPEED
This commit removes USB_GADGET_DUALSPEED and USB_GADGET_SUPERSPEED Kconfig options. Since now kernel allows many UDC drivers to be compiled, those options may turn to no longer be valid. For instance, if someone decides to build UDC that supports super speed and UDC that supports high speed only, the latter will be "assumed" to support super speed since USB_GADGET_SUPERSPEED will be selected by the former. The test of whether CONFIG_USB_GADGET_*SPEED was defined was just an optimisation which removed otherwise dead code (ie. if UDC is not dual speed, there is no need to handle cases that can happen if speed is high). This commit removes those checks. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/gadget.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 9517466ababb..d05b220f0fd3 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -558,14 +558,7 @@ static inline struct usb_gadget *dev_to_usb_gadget(struct device *dev)
558 */ 558 */
559static inline int gadget_is_dualspeed(struct usb_gadget *g) 559static inline int gadget_is_dualspeed(struct usb_gadget *g)
560{ 560{
561#ifdef CONFIG_USB_GADGET_DUALSPEED 561 return g->max_speed >= USB_SPEED_HIGH;
562 /* runtime test would check "g->max_speed" ... that might be
563 * useful to work around hardware bugs, but is mostly pointless
564 */
565 return 1;
566#else
567 return 0;
568#endif
569} 562}
570 563
571/** 564/**
@@ -575,15 +568,7 @@ static inline int gadget_is_dualspeed(struct usb_gadget *g)
575 */ 568 */
576static inline int gadget_is_superspeed(struct usb_gadget *g) 569static inline int gadget_is_superspeed(struct usb_gadget *g)
577{ 570{
578#ifdef CONFIG_USB_GADGET_SUPERSPEED 571 return g->max_speed >= USB_SPEED_SUPER;
579 /*
580 * runtime test would check "g->max_speed" ... that might be
581 * useful to work around hardware bugs, but is mostly pointless
582 */
583 return 1;
584#else
585 return 0;
586#endif
587} 572}
588 573
589/** 574/**