summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wcte12xp
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/wcte12xp
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/wcte12xp')
-rw-r--r--drivers/dahdi/wcte12xp/base.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/dahdi/wcte12xp/base.c b/drivers/dahdi/wcte12xp/base.c
index 9f93954..cbb1b04 100644
--- a/drivers/dahdi/wcte12xp/base.c
+++ b/drivers/dahdi/wcte12xp/base.c
@@ -958,7 +958,7 @@ static void set_span_devicetype(struct t1 *wc)
static int t1xxp_startup(struct dahdi_span *span)
{
- struct t1 *wc = span->pvt;
+ struct t1 *wc = container_of(span, struct t1, span);
int i;
check_and_load_vpm(wc);
@@ -979,7 +979,7 @@ static int t1xxp_startup(struct dahdi_span *span)
static int t1xxp_shutdown(struct dahdi_span *span)
{
- struct t1 *wc = span->pvt;
+ struct t1 *wc = container_of(span, struct t1, span);
t1_setreg(wc, 0x46, 0x41); /* GCR: Interrupt on Activation/Deactivation of AIX, LOS */
clear_bit(DAHDI_FLAGBIT_RUNNING, &span->flags);
return 0;
@@ -1227,7 +1227,7 @@ cleanup:
static int t1xxp_maint(struct dahdi_span *span, int cmd)
{
struct maint_work_struct *work;
- struct t1 *wc = span->pvt;
+ struct t1 *wc = container_of(span, struct t1, span);
if (wc->spantype == TYPE_E1) {
switch (cmd) {
@@ -1282,7 +1282,7 @@ static int t1xxp_maint(struct dahdi_span *span, int cmd)
static int t1xxp_clear_maint(struct dahdi_span *span)
{
- struct t1 *wc = span->pvt;
+ struct t1 *wc = container_of(span, struct t1, span);
int reg = 0;
/* Turn off local loop */
@@ -1488,7 +1488,7 @@ static inline int check_and_load_vpm(const struct t1 *wc)
static int
t1xxp_spanconfig(struct dahdi_span *span, struct dahdi_lineconfig *lc)
{
- struct t1 *wc = span->pvt;
+ struct t1 *wc = container_of(span, struct t1, span);
/* Do we want to SYNC on receive or not */
if (lc->sync) {
@@ -1568,7 +1568,6 @@ static int t1_software_init(struct t1 *wc)
}
wc->span.chans = wc->chans;
set_bit(DAHDI_FLAGBIT_RBS, &wc->span.flags);
- wc->span.pvt = wc;
init_waitqueue_head(&wc->span.maintq);
for (x = 0; x < wc->span.channels; x++) {
sprintf(wc->chans[x]->name, "WCT1/%d/%d", num, x + 1);