diff options
author | Mark Kettenis <kettenis@openbsd.org> | 2013-08-06 21:45:08 +0200 |
---|---|---|
committer | Jonathan Gray <jsg@jsg.id.au> | 2013-08-12 10:47:28 +1000 |
commit | df633d8ee45d024a903979468b3aeda731c93edd (patch) | |
tree | c9443ba9acd4f58020a9a971797df51ab5fe4e48 /sys/dev | |
parent | 66dbd7e03740c46e4d192f6ec69ad08e63ddc481 (diff) |
use appropriate define to mask of the clone bits from the minor
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/drm/drm_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index f5c99f4e41c..820a133c6a2 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -42,6 +42,7 @@ #include <sys/param.h> #include <sys/limits.h> +#include <sys/specdev.h> #include <sys/systm.h> #include <uvm/uvm.h> #include <uvm/uvm_device.h> @@ -333,7 +334,7 @@ drm_find_file_by_minor(struct drm_device *dev, int minor) struct drm_device * drm_get_device_from_kdev(dev_t kdev) { - int unit = minor(kdev) & 0xff; + int unit = minor(kdev) & ((1 << CLONE_SHIFT) - 1); if (unit < drm_cd.cd_ndevs) return drm_cd.cd_devs[unit]; |