[svn-commits] rmeyerriecks: linux/trunk r10365 - /linux/trunk/drivers/dahdi/wct4xxp/base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Dec 2 16:48:47 CST 2011


Author: rmeyerriecks
Date: Fri Dec  2 16:48:44 2011
New Revision: 10365

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10365
Log:
wct4xxp: Revise vpm struct due to product name changes

Renamed most of the "vpm450m" references to just "vpm".

Signed-off-by: Russ Meyerriecks <rmeyerriecks at digium.com>
Acked-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/trunk/drivers/dahdi/wct4xxp/base.c

Modified: linux/trunk/drivers/dahdi/wct4xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wct4xxp/base.c?view=diff&rev=10365&r1=10364&r2=10365
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/base.c Fri Dec  2 16:48:44 2011
@@ -373,7 +373,7 @@
 	int needed_latency;
 	
 #ifdef VPM_SUPPORT
-	struct vpm450m *vpm450m;
+	struct vpm450m *vpm;
 #endif	
 	struct spi_state st;
 };
@@ -410,7 +410,7 @@
 }
 
 #ifdef VPM_SUPPORT
-static void t4_vpm450_init(struct t4 *wc);
+static void t4_vpm_init(struct t4 *wc);
 
 static void echocan_free(struct dahdi_chan *chan, struct dahdi_echocan_state *ec);
 
@@ -819,12 +819,12 @@
 	spin_unlock_irqrestore(&wc->reglock, flags);
 }
 
-static void t4_check_vpm450(struct t4 *wc)
+static void t4_check_vpm(struct t4 *wc)
 {
 	int channel, tone, start, span;
 
-	if (vpm450m_checkirq(wc->vpm450m)) {
-		while(vpm450m_getdtmf(wc->vpm450m, &channel, &tone, &start)) {
+	if (vpm450m_checkirq(wc->vpm)) {
+		while(vpm450m_getdtmf(wc->vpm, &channel, &tone, &start)) {
 			span = channel & 0x3;
 			channel >>= 2;
 			if (!has_e1_span(wc))
@@ -1080,7 +1080,7 @@
 
 static const char *__t4_echocan_name(struct t4 *wc)
 {
-	if (wc->vpm450m) {
+	if (wc->vpm) {
 		if (wc->numspans == 2)
 			return vpmoct064_name;
 		else if (wc->numspans == 4)
@@ -1108,7 +1108,7 @@
 	const struct dahdi_echocan_ops *ops;
 	const struct dahdi_echocan_features *features;
 
-	if (!vpmsupport || !wc->vpm450m)
+	if (!vpmsupport || !wc->vpm)
 		return -ENODEV;
 
 	ops = &vpm_ec_ops;
@@ -1127,7 +1127,7 @@
 
 	channel = has_e1_span(wc) ? chan->chanpos : chan->chanpos + 4;
 
-	if (wc->vpm450m) {
+	if (wc->vpm) {
 		if (is_octal(wc))
 			channel = channel << 3;
 		else
@@ -1138,7 +1138,7 @@
 				"Channel is %d, Span is %d, offset is %d "
 				"length %d\n", wc->num, chan->chanpos,
 				chan->span->offset, channel, ecp->tap_length);
-		vpm450m_setec(wc->vpm450m, channel, ecp->tap_length);
+		vpm450m_setec(wc->vpm, channel, ecp->tap_length);
 	}
 	return 0;
 }
@@ -1152,7 +1152,7 @@
 
 	channel = has_e1_span(wc) ? chan->chanpos : chan->chanpos + 4;
 
-	if (wc->vpm450m) {
+	if (wc->vpm) {
 		if (is_octal(wc))
 			channel = channel << 3;
 		else
@@ -1163,7 +1163,7 @@
 				"Channel is %d, Span is %d, offset is %d "
 				"length 0\n", wc->num, chan->chanpos,
 				chan->span->offset, channel);
-		vpm450m_setec(wc->vpm450m, channel, 0);
+		vpm450m_setec(wc->vpm, channel, 0);
 	}
 }
 #endif
@@ -1209,7 +1209,7 @@
 	case DAHDI_TONEDETECT:
 		if (get_user(j, (__user int *) data))
 			return -EFAULT;
-		if (!wc->vpm450m)
+		if (!wc->vpm)
 			return -ENOSYS;
 		if (j && (vpmdtmfsupport == 0))
 			return -ENOSYS;
@@ -1226,7 +1226,7 @@
 		if (!has_e1_span(wc))
 			channel += (4 << 3);
 		channel |= chan->span->offset;
-		vpm450m_setdtmf(wc->vpm450m, channel, j & DAHDI_TONEDETECT_ON,
+		vpm450m_setdtmf(wc->vpm, channel, j & DAHDI_TONEDETECT_ON,
 				j & DAHDI_TONEDETECT_MUTE);
 		return 0;
 #endif
@@ -2847,7 +2847,7 @@
 		/* Start DMA, enabling DMA interrupts on read only */
 		wc->dmactrl |= (ts->spanflags & FLAG_2NDGEN) ? 0xc0000000 : 0xc0000003;
 #ifdef VPM_SUPPORT
-		wc->dmactrl |= (wc->vpm450m) ? T4_VPM_PRESENT : 0;
+		wc->dmactrl |= (wc->vpm) ? T4_VPM_PRESENT : 0;
 #endif
 		/* Seed interrupt register */
 		__t4_pci_out(wc, WC_INTR, 0x0c);
@@ -3903,12 +3903,12 @@
 		}
 	}
 #ifdef VPM_SUPPORT
-	if (wc->vpm450m) {
+	if (wc->vpm) {
 		if (test_and_clear_bit(T4_CHECK_VPM, &wc->checkflag)) {
 			/* How stupid is it that the octasic can't generate an
 			 * interrupt when there's a tone, in spite of what
 			 * their documentation says? */
-			t4_check_vpm450(wc);
+			t4_check_vpm(wc);
 		}
 	}
 #endif
@@ -4082,7 +4082,7 @@
 	}
 
 #ifdef VPM_SUPPORT
-	if (wc->vpm450m && vpmdtmfsupport) {
+	if (wc->vpm && vpmdtmfsupport) {
 		/* How stupid is it that the octasic can't generate an
 		 * interrupt when there's a tone, in spite of what their
 		 * documentation says? */
@@ -4127,7 +4127,7 @@
 	t4_pci_out(wc, WC_INTR, 0);
 #ifdef VPM_SUPPORT
 	wc->dmactrl = 0xc0000000 | (1 << 29) |
-		      ((wc->vpm450m) ? T4_VPM_PRESENT : 0);
+		      ((wc->vpm) ? T4_VPM_PRESENT : 0);
 #else	
 	wc->dmactrl = 0xc0000000 | (1 << 29);
 #endif
@@ -4139,7 +4139,7 @@
 #endif
 
 #ifdef VPM_SUPPORT
-static void t4_vpm450_init(struct t4 *wc)
+static void t4_vpm_init(struct t4 *wc)
 {
 	int laws[8] = { 0, };
 	int x;
@@ -4257,7 +4257,7 @@
 		return;
 	}
 
-	if (!(wc->vpm450m = init_vpm450m(wc, laws, wc->numspans, firmware))) {
+	if (!(wc->vpm = init_vpm450m(wc, laws, wc->numspans, firmware))) {
 		dev_notice(&wc->dev->dev, "VPM450: Failed to initialize\n");
 		if (firmware != &embedded_firmware)
 			release_firmware(firmware);
@@ -5188,11 +5188,11 @@
 	t4_gpio_setdir(wc, (0xff), (0xff));
 
 #ifdef VPM_SUPPORT
-	if (!wc->vpm450m) {
-		t4_vpm450_init(wc);
-		wc->dmactrl |= (wc->vpm450m) ? T4_VPM_PRESENT : 0;
+	if (!wc->vpm) {
+		t4_vpm_init(wc);
+		wc->dmactrl |= (wc->vpm) ? T4_VPM_PRESENT : 0;
 		t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
-		if (wc->vpm450m)
+		if (wc->vpm)
 			set_span_devicetype(wc);
 	}
 #endif
@@ -5268,10 +5268,10 @@
 	t4_hardware_stop(wc);
 	
 #ifdef VPM_SUPPORT
-	/* Release vpm450m */
-	if (wc->vpm450m)
-		release_vpm450m(wc->vpm450m);
-	wc->vpm450m = NULL;
+	/* Release vpm */
+	if (wc->vpm)
+		release_vpm450m(wc->vpm);
+	wc->vpm = NULL;
 #endif
 	/* Unregister spans */
 




More information about the svn-commits mailing list