Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325237
b: refs/heads/master
c: b8d61d4
h: refs/heads/master
i:
  325235: fbf985a
v: v3
  • Loading branch information
Jens Taprogge authored and Greg Kroah-Hartman committed Sep 12, 2012
1 parent fabe1d6 commit d21cb85
Show file tree
Hide file tree
Showing 2 changed files with 7 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: 699a89f1e291af0d47744200011d5c24d9e462a6
refs/heads/master: b8d61d49b2437df3a0aef17d321948783d275bb3
10 changes: 6 additions & 4 deletions trunk/drivers/staging/ipack/bridges/tpci200.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,11 @@ static irqreturn_t tpci200_interrupt(int irq, void *dev_id)

if (status_reg & TPCI200_SLOT_INT_MASK) {
/* callback to the IRQ handler for the corresponding slot */
rcu_read_lock();
for (i = 0; i < TPCI200_NB_SLOT; i++) {
if (!(status_reg & ((TPCI200_A_INT0 | TPCI200_A_INT1) << (2*i))))
continue;
slot_irq = tpci200->slots[i].irq;
slot_irq = rcu_dereference(tpci200->slots[i].irq);
if (slot_irq) {
ret = tpci200_slot_irq(slot_irq);
} else {
Expand All @@ -147,6 +148,7 @@ static irqreturn_t tpci200_interrupt(int irq, void *dev_id)
TPCI200_INT0_EN | TPCI200_INT1_EN);
}
}
rcu_read_unlock();
}

return ret;
Expand Down Expand Up @@ -303,9 +305,9 @@ static int tpci200_free_irq(struct ipack_device *dev)

__tpci200_free_irq(tpci200, dev);
slot_irq = tpci200->slots[dev->slot].irq;
tpci200->slots[dev->slot].irq = NULL;
RCU_INIT_POINTER(tpci200->slots[dev->slot].irq, NULL);
synchronize_rcu();
kfree(slot_irq);

mutex_unlock(&tpci200->mutex);
return 0;
}
Expand Down Expand Up @@ -490,7 +492,7 @@ static int tpci200_request_irq(struct ipack_device *dev, int vector,
slot_irq->arg = arg;
slot_irq->holder = dev;

tpci200->slots[dev->slot].irq = slot_irq;
rcu_assign_pointer(tpci200->slots[dev->slot].irq, slot_irq);
res = __tpci200_request_irq(tpci200, dev);

out_unlock:
Expand Down

0 comments on commit d21cb85

Please sign in to comment.