summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm.c
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-07-26 00:30:39 +0000
committerShaun Ruffell <sruffell@digium.com>2010-07-26 00:30:39 +0000
commit8682c2a90bd996765326fb6477a2466b63530b73 (patch)
tree384ce57c53c650294c490cda43b5ea7e624685cc /drivers/dahdi/wctdm.c
parent5c45b4da59502f5a30f3eb01e431d92d3d1c2202 (diff)
dahdi: Remove the 'pvt' member from dahdi_span.
The vast majority of board drivers already keep the dahdi_span structure in a driver specific structure. The others were easily converted. This way board drivers can use the container_of macro to find what was previously pointed to by the "pvt" member of the span. One less thing to think about in the span structure. git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@8984 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wctdm.c')
-rw-r--r--drivers/dahdi/wctdm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/dahdi/wctdm.c b/drivers/dahdi/wctdm.c
index 1160686..c9e4f51 100644
--- a/drivers/dahdi/wctdm.c
+++ b/drivers/dahdi/wctdm.c
@@ -2088,10 +2088,15 @@ static int wctdm_open(struct dahdi_chan *chan)
return 0;
}
+static inline struct wctdm *wctdm_from_span(struct dahdi_span *span)
+{
+ return container_of(span, struct wctdm, span);
+}
+
static int wctdm_watchdog(struct dahdi_span *span, int event)
{
printk(KERN_INFO "TDM: Restarting DMA\n");
- wctdm_restart_dma(span->pvt);
+ wctdm_restart_dma(wctdm_from_span(span));
return 0;
}
@@ -2365,7 +2370,6 @@ static int wctdm_initialize(struct wctdm *wc)
wc->span.watchdog = wctdm_watchdog;
init_waitqueue_head(&wc->span.maintq);
- wc->span.pvt = wc;
if (dahdi_register(&wc->span, 0)) {
printk(KERN_NOTICE "Unable to register span with DAHDI\n");
return -1;