summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wcfxo.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
commit5fd3fdc1cea7af8b1c46bbf2a5edd0c6fe2d3e54 (patch)
tree384ce57c53c650294c490cda43b5ea7e624685cc /drivers/dahdi/wcfxo.c
parent1252d17c7d47bba0301ada32c0705fc9698d3c8d (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/wcfxo.c')
-rw-r--r--drivers/dahdi/wcfxo.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/dahdi/wcfxo.c b/drivers/dahdi/wcfxo.c
index 5e61edb..f0f4ee9 100644
--- a/drivers/dahdi/wcfxo.c
+++ b/drivers/dahdi/wcfxo.c
@@ -564,6 +564,11 @@ static int wcfxo_setreg(struct wcfxo *wc, unsigned char reg, unsigned char value
return -1;
}
+static inline struct wcfxo *wcfxo_from_span(struct dahdi_span *span)
+{
+ return container_of(span, struct wcfxo, span);
+}
+
static int wcfxo_open(struct dahdi_chan *chan)
{
struct wcfxo *wc = chan->pvt;
@@ -576,7 +581,7 @@ static int wcfxo_open(struct dahdi_chan *chan)
static int wcfxo_watchdog(struct dahdi_span *span, int event)
{
printk(KERN_INFO "FXO: Restarting DMA\n");
- wcfxo_restart_dma(span->pvt);
+ wcfxo_restart_dma(wcfxo_from_span(span));
return 0;
}
@@ -660,7 +665,6 @@ static int wcfxo_initialize(struct wcfxo *wc)
#endif
init_waitqueue_head(&wc->span.maintq);
- wc->span.pvt = wc;
wc->chan->pvt = wc;
if (dahdi_register(&wc->span, 0)) {
printk(KERN_NOTICE "Unable to register span with DAHDI\n");