summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wcopenpci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dahdi/wcopenpci.c')
-rw-r--r--drivers/dahdi/wcopenpci.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/dahdi/wcopenpci.c b/drivers/dahdi/wcopenpci.c
index b28cac4..9e28279 100644
--- a/drivers/dahdi/wcopenpci.c
+++ b/drivers/dahdi/wcopenpci.c
@@ -1158,10 +1158,14 @@ static int openpci_open(struct dahdi_chan *chan)
return 0;
}
+static inline struct openpci* openpci_from_span(struct dahdi_span *span) {
+ return container_of(span, struct openpci, span);
+}
+
static int openpci_watchdog(struct dahdi_span *span, int event)
{
info("TDM: Restarting DMA");
- restart_dma(span->pvt);
+ restart_dma(openpci_from_span(span));
return 0;
}
@@ -1321,7 +1325,6 @@ static int span_initialize(struct openpci *wc)
wc->span.watchdog = openpci_watchdog;
init_waitqueue_head(&wc->span.maintq);
- wc->span.pvt = wc;
if (dahdi_register(&wc->span, 0)) {
cardcrit(wc->boardnum, "Unable to register span with dahdi");
return RET_FAIL;