USB: serial: io_ti: use calc_num_endpoints to verify endpoints
authorJohan Hovold <johan@kernel.org>
Thu, 16 Mar 2017 16:13:41 +0000 (17:13 +0100)
committerJohan Hovold <johan@kernel.org>
Tue, 28 Mar 2017 09:00:10 +0000 (11:00 +0200)
commit49f4ff2d74f5b6a865f6433c8995855092dcf97a
treeeb2255a96893ec846bece20172e9a8e844b8d6fe
parent204cc473bc896134870fda21cd279774b3ead024
USB: serial: io_ti: use calc_num_endpoints to verify endpoints

Use the calc_num_ports rather than attach callback to verify that the
required endpoints are present when in download mode.

This avoids allocating port resources for interfaces that won't be bound.

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