xf86drm: implement drmParseSubsystemType for OpenBSD
authorJonathan Gray <jsg@jsg.id.au>
Thu, 1 Dec 2016 04:18:40 +0000 (15:18 +1100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 5 Dec 2016 17:52:53 +0000 (17:52 +0000)
Implement drmParseSubsystemType for OpenBSD by always returning
DRM_BUS_PCI.  No non-pci drm drivers are in the kernel and this is
unlikely to change anytime soon as the existing ones aren't permissively
licensed.

Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
xf86drm.c

index 65764de..a889d48 100644 (file)
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -2887,6 +2887,8 @@ static int drmParseSubsystemType(int maj, int min)
         return DRM_BUS_PCI;
 
     return -EINVAL;
+#elif defined(__OpenBSD__)
+       return DRM_BUS_PCI;
 #else
 #warning "Missing implementation of drmParseSubsystemType"
     return -EINVAL;