diff options
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 9 | ||||
-rw-r--r-- | include/linux/usb/serial.h | 3 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index e2e131f85002..cb27fcb2fc90 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -43,6 +43,9 @@ | |||
43 | #define DRIVER_AUTHOR "Greg Kroah-Hartman <gregkh@linuxfoundation.org>" | 43 | #define DRIVER_AUTHOR "Greg Kroah-Hartman <gregkh@linuxfoundation.org>" |
44 | #define DRIVER_DESC "USB Serial Driver core" | 44 | #define DRIVER_DESC "USB Serial Driver core" |
45 | 45 | ||
46 | #define USB_SERIAL_TTY_MAJOR 188 | ||
47 | #define USB_SERIAL_TTY_MINORS 512 /* should be enough for a while */ | ||
48 | |||
46 | /* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead | 49 | /* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead |
47 | the MODULE_DEVICE_TABLE declarations in each serial driver | 50 | the MODULE_DEVICE_TABLE declarations in each serial driver |
48 | cause the "hotplug" program to pull in whatever module is necessary | 51 | cause the "hotplug" program to pull in whatever module is necessary |
@@ -449,7 +452,7 @@ static int serial_proc_show(struct seq_file *m, void *v) | |||
449 | char tmp[40]; | 452 | char tmp[40]; |
450 | 453 | ||
451 | seq_puts(m, "usbserinfo:1.0 driver:2.0\n"); | 454 | seq_puts(m, "usbserinfo:1.0 driver:2.0\n"); |
452 | for (i = 0; i < SERIAL_TTY_MINORS; ++i) { | 455 | for (i = 0; i < USB_SERIAL_TTY_MINORS; ++i) { |
453 | port = usb_serial_port_get_by_minor(i); | 456 | port = usb_serial_port_get_by_minor(i); |
454 | if (port == NULL) | 457 | if (port == NULL) |
455 | continue; | 458 | continue; |
@@ -1217,7 +1220,7 @@ static int __init usb_serial_init(void) | |||
1217 | { | 1220 | { |
1218 | int result; | 1221 | int result; |
1219 | 1222 | ||
1220 | usb_serial_tty_driver = alloc_tty_driver(SERIAL_TTY_MINORS); | 1223 | usb_serial_tty_driver = alloc_tty_driver(USB_SERIAL_TTY_MINORS); |
1221 | if (!usb_serial_tty_driver) | 1224 | if (!usb_serial_tty_driver) |
1222 | return -ENOMEM; | 1225 | return -ENOMEM; |
1223 | 1226 | ||
@@ -1230,7 +1233,7 @@ static int __init usb_serial_init(void) | |||
1230 | 1233 | ||
1231 | usb_serial_tty_driver->driver_name = "usbserial"; | 1234 | usb_serial_tty_driver->driver_name = "usbserial"; |
1232 | usb_serial_tty_driver->name = "ttyUSB"; | 1235 | usb_serial_tty_driver->name = "ttyUSB"; |
1233 | usb_serial_tty_driver->major = SERIAL_TTY_MAJOR; | 1236 | usb_serial_tty_driver->major = USB_SERIAL_TTY_MAJOR; |
1234 | usb_serial_tty_driver->minor_start = 0; | 1237 | usb_serial_tty_driver->minor_start = 0; |
1235 | usb_serial_tty_driver->type = TTY_DRIVER_TYPE_SERIAL; | 1238 | usb_serial_tty_driver->type = TTY_DRIVER_TYPE_SERIAL; |
1236 | usb_serial_tty_driver->subtype = SERIAL_TYPE_NORMAL; | 1239 | usb_serial_tty_driver->subtype = SERIAL_TYPE_NORMAL; |
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 9254c80a1cf8..d528b8045150 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -19,9 +19,6 @@ | |||
19 | #include <linux/sysrq.h> | 19 | #include <linux/sysrq.h> |
20 | #include <linux/kfifo.h> | 20 | #include <linux/kfifo.h> |
21 | 21 | ||
22 | #define SERIAL_TTY_MAJOR 188 /* Nice legal number now */ | ||
23 | #define SERIAL_TTY_MINORS 254 /* loads of devices :) */ | ||
24 | |||
25 | /* The maximum number of ports one device can grab at once */ | 22 | /* The maximum number of ports one device can grab at once */ |
26 | #define MAX_NUM_PORTS 8 | 23 | #define MAX_NUM_PORTS 8 |
27 | 24 | ||