Commit 68216747 authored by Böszörményi Zoltán's avatar Böszörményi Zoltán Committed by Peter Hutterer
Browse files

Introduce and use BUS_USB

With !155, the device bus ID received via udev is constructed
properly with the "usb:" prefix. But, it is not enough to
make the following line to work in Section "Device":

    BusID  "usb:0:1.2:1.0"

Introduce BUS_USB, so the prefix can be distinguished from BUS_PCI
and check the supplied BusID value against device->attribs->busid
in xf86PlatformDeviceCheckBusID().

Signed-off-by: default avatarBöszörményi Zoltán <>
parent c0dcadad
......@@ -268,6 +268,8 @@ StringToBusType(const char *busID, const char **retID)
ret = BUS_SBUS;
if (!xf86NameCmp(p, "platform"))
if (!xf86NameCmp(p, "usb"))
ret = BUS_USB;
if (ret != BUS_NONE)
if (retID)
*retID = busID + strlen(p) + 1;
......@@ -254,6 +254,7 @@ typedef struct _DriverRec {
#undef BUS_PCI
#undef BUS_SBUS
#undef BUS_USB
#undef BUS_last
......@@ -262,6 +263,7 @@ typedef enum {
BUS_last /* Keep last */
} BusType;
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment