diff mbox

[1/4] drm: Fix DRM_MINOR limits for control and render nodes

Message ID 1355708882-10814-1-git-send-email-martin.peres@free.fr (mailing list archive)
State New, archived
Headers show

Commit Message

Martin Peres Dec. 17, 2012, 1:47 a.m. UTC
From: Kristian Høgsberg <krh@bitplanet.net>

We got the minor number base right, but limit is too big and causes the
minor numer ranges for the control and render nodes to overlap.

v2: fix a off-by-one overlap as suggested by ihadzic@research.bell-labs.com

Signed-off-by: Martin Peres <martin.peres@labri.fr>
---
 drivers/gpu/drm/drm_stub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index c236fd2..b56e977 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -107,10 +107,10 @@  static int drm_minor_get_id(struct drm_device *dev, int type)
 
 	if (type == DRM_MINOR_CONTROL) {
                 base += 64;
-                limit = base + 127;
+                limit = base + 63;
         } else if (type == DRM_MINOR_RENDER) {
                 base += 128;
-                limit = base + 255;
+                limit = base + 63;
         }
 
 again: