diff options
author | Johan Hovold <johan@kernel.org> | 2014-08-18 18:14:52 +0200 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2014-09-01 12:04:27 +0200 |
commit | b9f040389e23fb95fde36cb0a3c2c516fb3e9d1c (patch) | |
tree | 9afe0fbfd69ab390e4f313676f5d6043b85231c2 /drivers/usb/serial | |
parent | 399aa9a75ad372b301e5050f3653a297a767fdc4 (diff) | |
download | linux-b9f040389e23fb95fde36cb0a3c2c516fb3e9d1c.tar.gz linux-b9f040389e23fb95fde36cb0a3c2c516fb3e9d1c.tar.bz2 linux-b9f040389e23fb95fde36cb0a3c2c516fb3e9d1c.zip |
USB: serial: add support for multi-port simple drivers
Add support for multi-port simple drivers.
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/usb-serial-simple.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c index fb79775447b0..02cb77a1e79d 100644 --- a/drivers/usb/serial/usb-serial-simple.c +++ b/drivers/usb/serial/usb-serial-simple.c @@ -20,7 +20,7 @@ #include <linux/usb.h> #include <linux/usb/serial.h> -#define DEVICE(vendor, IDS) \ +#define DEVICE_N(vendor, IDS, nport) \ static const struct usb_device_id vendor##_id_table[] = { \ IDS(), \ { }, \ @@ -31,9 +31,10 @@ static struct usb_serial_driver vendor##_device = { \ .name = #vendor, \ }, \ .id_table = vendor##_id_table, \ - .num_ports = 1, \ + .num_ports = nport, \ }; +#define DEVICE(vendor, IDS) DEVICE_N(vendor, IDS, 1) /* ZIO Motherboard USB driver */ #define ZIO_IDS() \ |