[svn-commits] sruffell: linux/trunk r9933 - /linux/trunk/drivers/dahdi/wct4xxp/base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 2 15:01:04 CDT 2011


Author: sruffell
Date: Thu Jun  2 15:01:00 2011
New Revision: 9933

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9933
Log:
wct4xxp: Move the check for the VPM to module load time.

This allows dahdi-base to know whether or not there is a VPM attached to
the module as soon as it's registered as opposed to waiting for start
span. This will simplify dahdi_genconf's task of creating a valid
configuration file.

Signed-off-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=9933&r1=9932&r2=9933
==============================================================================
--- linux/trunk/drivers/dahdi/wct4xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wct4xxp/base.c Thu Jun  2 15:01:00 2011
@@ -2776,18 +2776,6 @@
 			dev_info(&wc->dev->dev, "SPAN %d: Quaternary Sync "
 					"Source\n", span->spanno);
 	}
-#ifdef VPM_SUPPORT
-	if (!alreadyrunning && !wc->vpm) {
-		wait_a_little();
-		t4_vpm400_init(wc);
-		if (!wc->vpm)
-			t4_vpm450_init(wc);
-		wc->dmactrl |= wc->vpm;
-		t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
-		if (wc->vpm)
-			set_span_devicetype(wc);
-	}
-#endif
 	if (debug)
 		dev_info(&wc->dev->dev, "Completed startup!\n");
 	clear_bit(T4_IGNORE_LATENCY, &wc->checkflag);
@@ -4840,6 +4828,19 @@
 	t4_gpio_setdir(wc, (1 << 17), (1 << 17));
 	t4_gpio_setdir(wc, (0xff), (0xff));
 
+#ifdef VPM_SUPPORT
+	if (!wc->vpm) {
+		wait_a_little();
+		t4_vpm400_init(wc);
+		if (!wc->vpm)
+			t4_vpm450_init(wc);
+		wc->dmactrl |= wc->vpm;
+		t4_pci_out(wc, WC_DMACTRL, wc->dmactrl);
+		if (wc->vpm)
+			set_span_devicetype(wc);
+	}
+#endif
+
 	create_sysfs_files(wc);
 	
 #if 0




More information about the svn-commits mailing list