]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: correct lock type in destroy
authorBen Widawsky <ben@bwidawsk.net>
Mon, 23 Jan 2012 23:30:02 +0000 (15:30 -0800)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 26 Jan 2012 10:29:23 +0000 (11:29 +0100)
This is only relevant when using module unloading, and really only helps
get rid of a probably benign warning.

I can't remember if I sent this out already, but it's not turning up in
any of my searches.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c

index 5d433fc11ace138748907b17cbb3a9932732b46b..275ab6fecbd8a056938ebbc8134d8e87453a1eac 100644 (file)
@@ -1017,11 +1017,12 @@ void i915_destroy_error_state(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
        struct drm_i915_error_state *error;
+       unsigned long flags;
 
-       spin_lock(&dev_priv->error_lock);
+       spin_lock_irqsave(&dev_priv->error_lock, flags);
        error = dev_priv->first_error;
        dev_priv->first_error = NULL;
-       spin_unlock(&dev_priv->error_lock);
+       spin_unlock_irqrestore(&dev_priv->error_lock, flags);
 
        if (error)
                i915_error_state_free(dev, error);