From e87f5b54bed96cd448b650e44390dddd8dbbd240 Mon Sep 17 00:00:00 2001 From: bjs Date: Sat, 19 Jul 2008 17:23:04 +0000 Subject: [PATCH] set dev->kdev = kdev at open time, not in drm_ioctl. --- sys/external/bsd/drm/dist/bsd-core/drm_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/external/bsd/drm/dist/bsd-core/drm_drv.c b/sys/external/bsd/drm/dist/bsd-core/drm_drv.c index 185e651baaef..a164b905d27f 100644 --- a/sys/external/bsd/drm/dist/bsd-core/drm_drv.c +++ b/sys/external/bsd/drm/dist/bsd-core/drm_drv.c @@ -847,6 +847,8 @@ int drm_open(DRM_CDEV kdev, int flags, int fmt, DRM_STRUCTCDEVPROC *p) dev = DRIVER_SOFTC(minor(kdev)); + dev->kdev = kdev; + DRM_DEBUG( "open_count = %d\n", dev->open_count ); retcode = drm_open_helper(kdev, flags, fmt, DRM_CDEVPROC_REAL(p), dev); @@ -1099,8 +1101,6 @@ int drm_ioctl(DRM_CDEV kdev, u_long cmd, DRM_IOCTL_DATA data, int flags, ((ioctl->flags & DRM_MASTER) && !file_priv->master)) return EACCES; -/* XXXNETBSD */ -dev->kdev = kdev; if (is_driver_ioctl) { DRM_LOCK(); /* shared code returns -errno */