Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/drm fix a confusion between dev_t and ...



details:   https://anonhg.NetBSD.org/src/rev/0a6777b512d4
branches:  trunk
changeset: 335241:0a6777b512d4
user:      mrg <mrg%NetBSD.org@localhost>
date:      Wed Dec 31 08:55:18 2014 +0000

description:
fix a confusion between dev_t and devmajor_t, and include the primary
minor when calling makedev().

diffstat:

 sys/external/bsd/drm2/drm/drm_vm.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 19664f59e0c3 -r 0a6777b512d4 sys/external/bsd/drm2/drm/drm_vm.c
--- a/sys/external/bsd/drm2/drm/drm_vm.c        Wed Dec 31 08:24:50 2014 +0000
+++ b/sys/external/bsd/drm2/drm/drm_vm.c        Wed Dec 31 08:55:18 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_vm.c,v 1.6 2014/12/14 23:48:58 chs Exp $   */
+/*     $NetBSD: drm_vm.c,v 1.7 2014/12/31 08:55:18 mrg Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_vm.c,v 1.6 2014/12/14 23:48:58 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_vm.c,v 1.7 2014/12/31 08:55:18 mrg Exp $");
 
 #include <sys/types.h>
 #include <sys/conf.h>
@@ -49,7 +49,8 @@
 drm_mmap_object(struct drm_device *dev, off_t offset, size_t size, int prot,
     struct uvm_object **uobjp, voff_t *uoffsetp, struct file *file __unused)
 {
-       dev_t devno = cdevsw_lookup_major(&drm_cdevsw);
+       devmajor_t maj = cdevsw_lookup_major(&drm_cdevsw);
+       dev_t devno = makedev(maj, dev->primary->index);
        struct uvm_object *uobj;
 
        KASSERT(offset == (offset & ~(PAGE_SIZE-1)));



Home | Main Index | Thread Index | Old Index