diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 0263e6907..5e34eab99 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -268,6 +268,8 @@ StringToBusType(const char *busID, const char **retID) ret = BUS_SBUS; if (!xf86NameCmp(p, "platform")) ret = BUS_PLATFORM; + if (!xf86NameCmp(p, "usb")) + ret = BUS_USB; if (ret != BUS_NONE) if (retID) *retID = busID + strlen(p) + 1; diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h index f38f6cd68..8f8685ef2 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -254,6 +254,7 @@ typedef struct _DriverRec { #undef BUS_PCI #undef BUS_SBUS #undef BUS_PLATFORM +#undef BUS_USB #undef BUS_last #endif @@ -262,6 +263,7 @@ typedef enum { BUS_PCI, BUS_SBUS, BUS_PLATFORM, + BUS_USB, BUS_last /* Keep last */ } BusType; diff --git a/hw/xfree86/os-support/linux/lnx_platform.c b/hw/xfree86/os-support/linux/lnx_platform.c index e62306219..fe2142182 100644 --- a/hw/xfree86/os-support/linux/lnx_platform.c +++ b/hw/xfree86/os-support/linux/lnx_platform.c @@ -103,6 +103,11 @@ xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *bu return FALSE; return TRUE; } + else if (bustype == BUS_USB) { + if (strcasecmp(busid, device->attribs->busid)) + return FALSE; + return TRUE; + } return FALSE; }