summaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2013-06-27 21:27:07 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-17 00:33:02 +0200
commit36ff66db3fb5642906e46e73ca9cf92f1c5974ff (patch)
tree69c6dfc6275116e073727d11d8f8febb4e71350a /include/uapi
parentMerge tag 'fixes-for-v3.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
downloadlinux-36ff66db3fb5642906e46e73ca9cf92f1c5974ff.tar.xz
linux-36ff66db3fb5642906e46e73ca9cf92f1c5974ff.zip
USB: move the definition of USB_MAXCHILDREN
The USB_MAXCHILDREN symbol is used in include/uapi/linux/usb/ch11.h, a user-mode header, even though it is defined in include/linux/usb.h, which is kernel-only. This causes compile-time errors when user programs try to #include linux/usb/ch11.h. This patch fixes the problem by moving the definition of USB_MAXCHILDREN into ch11.h. It also gets rid of unneeded parentheses. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/usb/ch11.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/uapi/linux/usb/ch11.h b/include/uapi/linux/usb/ch11.h
index 7692dc69ccf7..331499d597fa 100644
--- a/include/uapi/linux/usb/ch11.h
+++ b/include/uapi/linux/usb/ch11.h
@@ -11,6 +11,17 @@
#include <linux/types.h> /* __u8 etc */
+/* This is arbitrary.
+ * From USB 2.0 spec Table 11-13, offset 7, a hub can
+ * have up to 255 ports. The most yet reported is 10.
+ *
+ * Current Wireless USB host hardware (Intel i1480 for example) allows
+ * up to 22 devices to connect. Upcoming hardware might raise that
+ * limit. Because the arrays need to add a bit for hub status data, we
+ * use 31, so plus one evens out to four bytes.
+ */
+#define USB_MAXCHILDREN 31
+
/*
* Hub request types
*/