summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2008-08-14 03:55:11 +0000
committerGreg Kroah-Hartman <gregkh@suse.de>2008-08-20 11:05:02 -0700
commitbb457a9869e945299445f13bf618975d1562ab83 (patch)
tree76c6328cad297d5d3eab11e1666e8f5ab49294e8 /include
parent092634b61d9a75c491749dd983f8738312c1e547 (diff)
usb-serial: don't release unregistered minors
commit 0282b7f2a874e72c18fcd5a112ccf67f71ba7f5c upstream This patch (as1121) fixes a bug in the USB serial core. When a device is unregistered, the core will give back its minors -- even if the device hasn't been assigned any! The patch reserves the highest minor value (255) to mean that no minor was assigned. It also removes some dead code and does a small style fixup. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/usb/serial.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 8f891cbaf9ab..4a6583d95a8e 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -17,7 +17,8 @@
#include <linux/mutex.h>
#define SERIAL_TTY_MAJOR 188 /* Nice legal number now */
-#define SERIAL_TTY_MINORS 255 /* loads of devices :) */
+#define SERIAL_TTY_MINORS 254 /* loads of devices :) */
+#define SERIAL_TTY_NO_MINOR 255 /* No minor was assigned */
/* The maximum number of ports one device can grab at once */
#define MAX_NUM_PORTS 8