diff options
author | Bruno Prémont <bonbons@linux-vserver.org> | 2014-12-21 17:43:31 +0100 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-12-22 08:36:15 +1000 |
commit | e4ec6dea325ac8597fc9c2b7777e22b7a0b6ee20 (patch) | |
tree | db5f20d7f3c7c5b237af7e234e6f6d55003872b9 /nvkm/core/notify.c | |
parent | 2fe275d0623e8d78acd60ef5da043f446ee00e5d (diff) | |
download | nouveau-e4ec6dea325ac8597fc9c2b7777e22b7a0b6ee20.tar.gz |
nouveau: Do not BUG_ON(!spin_is_locked()) on UP
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>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'nvkm/core/notify.c')
-rw-r--r-- | nvkm/core/notify.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nvkm/core/notify.c b/nvkm/core/notify.c index d1bcde55e..839a32577 100644 --- a/nvkm/core/notify.c +++ b/nvkm/core/notify.c @@ -98,7 +98,7 @@ nvkm_notify_send(struct nvkm_notify *notify, void *data, u32 size) struct nvkm_event *event = notify->event; unsigned long flags; - BUG_ON(!spin_is_locked(&event->list_lock)); + assert_spin_locked(&event->list_lock); BUG_ON(size != notify->size); spin_lock_irqsave(&event->refs_lock, flags); |