diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2008-07-29 12:01:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-13 17:32:50 -0700 |
commit | 0282b7f2a874e72c18fcd5a112ccf67f71ba7f5c (patch) | |
tree | 85db6db24e0ee5d8c018fa9b58a720d3da521b64 /include | |
parent | e67d70f2f55d90c79dcb384ad5b798f0f9a68085 (diff) | |
download | linux-3.10-0282b7f2a874e72c18fcd5a112ccf67f71ba7f5c.tar.gz linux-3.10-0282b7f2a874e72c18fcd5a112ccf67f71ba7f5c.tar.bz2 linux-3.10-0282b7f2a874e72c18fcd5a112ccf67f71ba7f5c.zip |
usb-serial: don't release unregistered minors
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>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb/serial.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 09a3e6a7518..655341d0f53 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 |