summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2013-08-08 19:10:21 +0200
committerDave Airlie <airlied@redhat.com>2013-08-19 14:22:29 +1000
commit24f400326793341b005546d6ef82770f8d30d092 (patch)
tree0907625471759398224ce7d2a39570de74e2aeb9 /drivers
parent90254ac084a6465e46cdada933bf3a7e9ee90277 (diff)
downloadlinux-stable-24f400326793341b005546d6ef82770f8d30d092.tar.gz
linux-stable-24f400326793341b005546d6ef82770f8d30d092.tar.bz2
linux-stable-24f400326793341b005546d6ef82770f8d30d092.zip
drm: fix minor number range calculation
Currently, both ranges overlap. Fix the limits so both ranges are mutually exclusive. Also use the occasion to convert whitespaces to tabs. Signed-off-by: Kristian Høgsberg <krh@bitplanet.net> (fixed up tabs and adjust commit-msg accordingly) Signed-off-by: David Herrmann <dh.herrmann@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_stub.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c
index aa0664d91060..5edf938bbcc3 100644
--- a/drivers/gpu/drm/drm_stub.c
+++ b/drivers/gpu/drm/drm_stub.c
@@ -113,12 +113,12 @@ static int drm_minor_get_id(struct drm_device *dev, int type)
int base = 0, limit = 63;
if (type == DRM_MINOR_CONTROL) {
- base += 64;
- limit = base + 127;
- } else if (type == DRM_MINOR_RENDER) {
- base += 128;
- limit = base + 255;
- }
+ base += 64;
+ limit = base + 63;
+ } else if (type == DRM_MINOR_RENDER) {
+ base += 128;
+ limit = base + 63;
+ }
mutex_lock(&dev->struct_mutex);
ret = idr_alloc(&drm_minors_idr, NULL, base, limit, GFP_KERNEL);