summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wct4xxp
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/wct4xxp
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/wct4xxp')
-rw-r--r--drivers/dahdi/wct4xxp/base.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/dahdi/wct4xxp/base.c b/drivers/dahdi/wct4xxp/base.c
index d2a07ca..d76dffd 100644
--- a/drivers/dahdi/wct4xxp/base.c
+++ b/drivers/dahdi/wct4xxp/base.c
@@ -1236,7 +1236,7 @@ static int echocan_create(struct dahdi_chan *chan, struct dahdi_echocanparams *e
struct dahdi_echocanparam *p, struct dahdi_echocan_state **ec)
{
struct t4 *wc = chan->pvt;
- struct t4_span *tspan = chan->span->pvt;
+ struct t4_span *tspan = container_of(chan->span, struct t4_span, span);
int channel;
const struct dahdi_echocan_ops *ops;
const struct dahdi_echocan_features *features;
@@ -1434,7 +1434,7 @@ static void t4_hdlc_hard_xmit(struct dahdi_chan *chan)
static int t4_maint(struct dahdi_span *span, int cmd)
{
- struct t4_span *ts = span->pvt;
+ struct t4_span *ts = container_of(span, struct t4_span, span);
struct t4 *wc = ts->owner;
unsigned int reg;
@@ -1556,7 +1556,7 @@ static int t4_maint(struct dahdi_span *span, int cmd)
static int t4_clear_maint(struct dahdi_span *span)
{
- struct t4_span *ts = span->pvt;
+ struct t4_span *ts = container_of(span, struct t4_span, span);
struct t4 *wc = ts->owner;
unsigned int reg;
@@ -1583,7 +1583,7 @@ static int t4_clear_maint(struct dahdi_span *span)
static int t4_reset_counters(struct dahdi_span *span)
{
- struct t4_span *ts = span->pvt;
+ struct t4_span *ts = container_of(span, struct t4_span, span);
memset(&ts->span.count, 0, sizeof(ts->span.count));
return 0;
}
@@ -1647,7 +1647,7 @@ static int t4_shutdown(struct dahdi_span *span)
int tspan;
int wasrunning;
unsigned long flags;
- struct t4_span *ts = span->pvt;
+ struct t4_span *ts = container_of(span, struct t4_span, span);
struct t4 *wc = ts->owner;
tspan = span->offset + 1;
@@ -1697,7 +1697,7 @@ static int t4_shutdown(struct dahdi_span *span)
static int t4_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc)
{
int i;
- struct t4_span *ts = span->pvt;
+ struct t4_span *ts = container_of(span, struct t4_span, span);
struct t4 *wc = ts->owner;
printk(KERN_INFO "About to enter spanconfig!\n");
@@ -1913,7 +1913,6 @@ static void init_spans(struct t4 *wc)
#endif
ts->span.dacs = t4_dacs;
}
- ts->span.pvt = ts;
ts->owner = wc;
ts->span.offset = x;
init_waitqueue_head(&ts->span.maintq);
@@ -2374,7 +2373,7 @@ static int t4_startup(struct dahdi_span *span)
int tspan;
unsigned long flags;
int alreadyrunning;
- struct t4_span *ts = span->pvt;
+ struct t4_span *ts = container_of(span, struct t4_span, span);
struct t4 *wc = ts->owner;
set_bit(T4_IGNORE_LATENCY, &wc->checkflag);