linux: fix topology

Find the parent dev by removing the last number after the . or -
(and prepending with usb if only one number is left) and comparing
it against the sysfs_dir or previously scanned devices.

HdG: Drop hardcoded special casing of root-hubs, this is fixed in a better
way in a later commit.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2 files changed