Fix mtp-probe interface regexp for some USB setups with integrated hub

In some setups, USB interface directories in /sys have format 1-1.1:1.1,
not just 1-1:1.1. At least in some cases this can be caused by
additional hub plugged into the root hub (as part of the motherboard
circuitry).

The patch fixes regular expression that matches interface directory
names so that MTP devices are properly detected in such a configuration.

For example lsusb -t with Jolla (2931:0a01) plugged into an USB 2.0 port
of Asus U36J notebook:

/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
        |__ Port 1: Dev 113, If 0, Class=Communications, Driver=, 480M
        |__ Port 1: Dev 113, If 1, Class=CDC Data, Driver=, 480M
        |__ Port 1: Dev 113, If 2, Class=Communications, Driver=, 480M
        |__ Port 1: Dev 113, If 3, Class=CDC Data, Driver=, 480M
        |__ Port 1: Dev 113, If 4, Class=Imaging, Driver=, 480M

The device with Class=Hub is:

Bus 003 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub

Signed-off-by: Linus Walleij <triad@df.lth.se>
1 file changed