aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_fops.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/drm_fops.c')
-rw-r--r--drivers/char/drm/drm_fops.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c
index 3992f73299cc..f09d4b5002b0 100644
--- a/drivers/char/drm/drm_fops.c
+++ b/drivers/char/drm/drm_fops.c
@@ -326,6 +326,7 @@ int drm_release(struct inode *inode, struct file *filp)
326 struct drm_file *file_priv = filp->private_data; 326 struct drm_file *file_priv = filp->private_data;
327 struct drm_device *dev = file_priv->head->dev; 327 struct drm_device *dev = file_priv->head->dev;
328 int retcode = 0; 328 int retcode = 0;
329 unsigned long irqflags;
329 330
330 lock_kernel(); 331 lock_kernel();
331 332
@@ -357,9 +358,11 @@ int drm_release(struct inode *inode, struct file *filp)
357 */ 358 */
358 359
359 do{ 360 do{
360 spin_lock(&dev->lock.spinlock); 361 spin_lock_irqsave(&dev->lock.spinlock,
362 irqflags);
361 locked = dev->lock.idle_has_lock; 363 locked = dev->lock.idle_has_lock;
362 spin_unlock(&dev->lock.spinlock); 364 spin_unlock_irqrestore(&dev->lock.spinlock,
365 irqflags);
363 if (locked) 366 if (locked)
364 break; 367 break;
365 schedule(); 368 schedule();