usbip: dynamically allocate idev by nports found in sysfs
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Fri, 25 May 2018 14:23:46 +0000 (16:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 3 Aug 2018 05:50:26 +0000 (07:50 +0200)
commit38c8c0a9709d2159fd989b0061b0b73364427b64
treee0a06932fa255514083d305e0d46472d04fe5fba
parentbc30588b8e082f48882f713c19369bc9ae4c5509
usbip: dynamically allocate idev by nports found in sysfs

[ Upstream commit de19ca6fd72c7dd45ad82403e7b3fe9c74ef6767 ]

As the amount of available ports varies by the kernels build
configuration. To remove the limitation of the fixed 128 ports
we allocate the amount of idevs by using the number we get
from the kernel.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Acked-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/usb/usbip/libsrc/vhci_driver.c
tools/usb/usbip/libsrc/vhci_driver.h