drm/msm: Do not BUG_ON(!spin_is_locked()) on UP
authorBruno Prémont <bonbons@linux-vserver.org>
Sun, 21 Dec 2014 16:43:44 +0000 (17:43 +0100)
committerRob Clark <robdclark@gmail.com>
Sun, 1 Feb 2015 20:30:25 +0000 (15:30 -0500)
On !SMP systems spinlocks do not exist. Thus checking of they
are active will always fail.

Use
  assert_spin_locked(lock);
instead of
  BUG_ON(!spin_is_locked(lock));
to not BUG() on all UP systems.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
[robclark: drop stray ')']
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/mdp/mdp_kms.c

index 2a731722d8407de40be9d2bbd82d6cabb8f8c737..1988c243f437eca2835fe8ce7a47166e735c2b8a 100644 (file)
@@ -34,7 +34,7 @@ static void update_irq(struct mdp_kms *mdp_kms)
        struct mdp_irq *irq;
        uint32_t irqmask = mdp_kms->vblank_mask;
 
-       BUG_ON(!spin_is_locked(&list_lock));
+       assert_spin_locked(&list_lock);
 
        list_for_each_entry(irq, &mdp_kms->irq_list, node)
                irqmask |= irq->irqmask;