]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: serial: ipaq: always register a single port
authorJohan Hovold <johan@kernel.org>
Thu, 16 Mar 2017 16:13:40 +0000 (17:13 +0100)
committerJohan Hovold <johan@kernel.org>
Tue, 28 Mar 2017 09:00:09 +0000 (11:00 +0200)
commit204cc473bc896134870fda21cd279774b3ead024
tree55b1f4a471cff134afc698e74b5705b40aaf0193
parent03b72aecadc2d7b0e8f200ec70b853e39a7e55da
USB: serial: ipaq: always register a single port

Use the calc_num_ports callback to ignore unused endpoints.

The driver binds to any interface with at least one bulk-in and one
bulk-out endpoint, but some devices can have three or more endpoints of
which only either the first or second pair of endpoints is needed.

This avoids allocating resources for unused endpoints, and specifically
a port is no longer registered for the unused first endpoint pair when
there are more than three endpoints.

Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/ipaq.c