summaryrefslogtreecommitdiff
path: root/bsd/drm_drv.h
diff options
context:
space:
mode:
Diffstat (limited to 'bsd/drm_drv.h')
-rw-r--r--bsd/drm_drv.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/bsd/drm_drv.h b/bsd/drm_drv.h
index 1083f9f9..bf1e2ac4 100644
--- a/bsd/drm_drv.h
+++ b/bsd/drm_drv.h
@@ -417,11 +417,13 @@ const char *DRM(find_description)(int vendor, int device) {
return NULL;
}
-/* Initialize the DRM on first open. Called with device's lock held */
+/* Initialize the DRM on first open. */
static int DRM(setup)( drm_device_t *dev )
{
int i;
+ DRM_SPINLOCK_ASSERT(&dev->dev_lock);
+
DRIVER_PRESETUP();
dev->buf_use = 0;
@@ -496,9 +498,7 @@ static int DRM(setup)( drm_device_t *dev )
return 0;
}
-/* Free resources associated with the DRM on the last close.
- * Called with the device's lock held.
- */
+/* Free resources associated with the DRM on the last close. */
static int DRM(takedown)( drm_device_t *dev )
{
drm_magic_entry_t *pt, *next;
@@ -506,6 +506,8 @@ static int DRM(takedown)( drm_device_t *dev )
drm_map_list_entry_t *list;
int i;
+ DRM_SPINLOCK_ASSERT(&dev->dev_lock);
+
DRM_DEBUG( "\n" );
DRIVER_PRETAKEDOWN();