Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 371606
b: refs/heads/master
c: 10eeaf1
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Apr 26, 2013
1 parent 216d9cb commit df86daa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d1d1cc97b8b24e9f7842de13f4b00393392c990
refs/heads/master: 10eeaf123dd55cd2c1d2d23366d211dafbe71bde
12 changes: 8 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/core/core/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ static void
nouveau_event_put_locked(struct nouveau_event *event, int index,
struct nouveau_eventh *handler)
{
if (!--event->index[index].refs)
event->disable(event, index);
if (!--event->index[index].refs) {
if (event->disable)
event->disable(event, index);
}
list_del(&handler->head);
}

Expand All @@ -53,8 +55,10 @@ nouveau_event_get(struct nouveau_event *event, int index,
spin_lock_irqsave(&event->lock, flags);
if (index < event->index_nr) {
list_add(&handler->head, &event->index[index].list);
if (!event->index[index].refs++)
event->enable(event, index);
if (!event->index[index].refs++) {
if (event->enable)
event->enable(event, index);
}
}
spin_unlock_irqrestore(&event->lock, flags);
}
Expand Down

0 comments on commit df86daa

Please sign in to comment.