Correctly set DRM_MAX_MINOR for all platforms.
authorRobert Noland <rnoland@2hip.net>
Wed, 25 Nov 2009 21:09:24 +0000 (15:09 -0600)
committerRobert Noland <rnoland@2hip.net>
Wed, 25 Nov 2009 21:09:24 +0000 (15:09 -0600)
DRM_MAJOR is platform specific, but not used outside of xf86drm.c
that I can find.

xf86drm.c
xf86drm.h

index 364fe17..06d645d 100644 (file)
--- a/xf86drm.c
+++ b/xf86drm.c
 #define DRM_MAJOR 226          /* Linux */
 #endif
 
-#ifndef DRM_MAX_MINOR
-#define DRM_MAX_MINOR 16
-#endif
-
 /*
  * This definition needs to be changed on some systems if dev_t is a structure.
  * If there is a header file we can get it from, there would be best.
index 9944d32..496d95d 100644 (file)
--- a/xf86drm.h
+++ b/xf86drm.h
 #include <stdint.h>
 #include <drm.h>
 
+#ifndef DRM_MAX_MINOR
+#define DRM_MAX_MINOR   16
+#endif
+
 #if defined(__linux__)
 
 #define DRM_IOCTL_NR(n)                _IOC_NR(n)
@@ -47,8 +51,6 @@
 #define DRM_IOC_WRITE          _IOC_WRITE
 #define DRM_IOC_READWRITE      _IOC_READ|_IOC_WRITE
 #define DRM_IOC(dir, group, nr, size) _IOC(dir, group, nr, size)
-#define DRM_MAJOR       226
-#define DRM_MAX_MINOR   15
 
 #else /* One of the *BSDs */