summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2017-03-02 12:51:15 +0100
committerJohan Hovold <johan@kernel.org>2017-03-16 10:13:37 +0100
commitef88f33fc1ee0a12a1e5eee7e4f70b7743100a19 (patch)
tree6611aadb6396fe174a3c3d657cef11391266c65e /drivers/usb/serial/usb-serial.c
parentc2fef4564cae387c2f724a95350084c2e9371250 (diff)
downloadblackbird-op-linux-ef88f33fc1ee0a12a1e5eee7e4f70b7743100a19.tar.gz
blackbird-op-linux-ef88f33fc1ee0a12a1e5eee7e4f70b7743100a19.zip
USB: serial: clean up endpoint and port-counter types
Use unsigned-char type for the endpoint and port counters. Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r--drivers/usb/serial/usb-serial.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index c20d90ed1ef2..e5b859ad15c6 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -728,12 +728,12 @@ static int usb_serial_probe(struct usb_interface *interface,
int buffer_size;
int i;
int j;
- int num_interrupt_in = 0;
- int num_interrupt_out = 0;
- int num_bulk_in = 0;
- int num_bulk_out = 0;
+ unsigned char num_interrupt_in = 0;
+ unsigned char num_interrupt_out = 0;
+ unsigned char num_bulk_in = 0;
+ unsigned char num_bulk_out = 0;
int num_ports = 0;
- int max_endpoints;
+ unsigned char max_endpoints;
mutex_lock(&table_lock);
type = search_serial_device(interface);
@@ -879,7 +879,7 @@ static int usb_serial_probe(struct usb_interface *interface,
num_ports = MAX_NUM_PORTS;
}
- serial->num_ports = num_ports;
+ serial->num_ports = (unsigned char)num_ports;
serial->num_bulk_in = num_bulk_in;
serial->num_bulk_out = num_bulk_out;
serial->num_interrupt_in = num_interrupt_in;
@@ -894,7 +894,7 @@ static int usb_serial_probe(struct usb_interface *interface,
max_endpoints = max(num_bulk_in, num_bulk_out);
max_endpoints = max(max_endpoints, num_interrupt_in);
max_endpoints = max(max_endpoints, num_interrupt_out);
- max_endpoints = max(max_endpoints, (int)serial->num_ports);
+ max_endpoints = max(max_endpoints, serial->num_ports);
serial->num_port_pointers = max_endpoints;
dev_dbg(ddev, "setting up %d port structure(s)\n", max_endpoints);
OpenPOWER on IntegriCloud