[svn-commits] tzafrir: linux/trunk r10429 - /linux/trunk/drivers/dahdi/xpp/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jan 11 11:04:39 CST 2012


Author: tzafrir
Date: Wed Jan 11 11:04:36 2012
New Revision: 10429

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10429
Log:
xpp: fix "non-const" index, right header, indent

Synchronize some changes from out internal tree:
* Fix a few of the places where indent did a lousy job.
* sparse did not like using the const MAX_ARGS as an index. Make it a define.
* Incorrect header included in card_fxs.c (doh!).
* One more funciton to statify.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

Modified:
    linux/trunk/drivers/dahdi/xpp/card_bri.c
    linux/trunk/drivers/dahdi/xpp/card_fxs.c
    linux/trunk/drivers/dahdi/xpp/card_global.c

Modified: linux/trunk/drivers/dahdi/xpp/card_bri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_bri.c?view=diff&rev=10429&r1=10428&r2=10429
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_bri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_bri.c Wed Jan 11 11:04:36 2012
@@ -1315,7 +1315,7 @@
 	return -ENOENT;
 }
 
-int BRI_echocancel_timeslot(xpd_t *xpd, int pos)
+static int BRI_echocancel_timeslot(xpd_t *xpd, int pos)
 {
 	return xpd->addr.subunit * 4 + pos;
 }

Modified: linux/trunk/drivers/dahdi/xpp/card_fxs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxs.c?view=diff&rev=10429&r1=10428&r2=10429
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxs.c Wed Jan 11 11:04:36 2012
@@ -27,7 +27,7 @@
 #include "xpd.h"
 #include "xproto.h"
 #include "xpp_dahdi.h"
-#include "card_fxo.h"
+#include "card_fxs.h"
 #include "dahdi_debug.h"
 #include "xbus-core.h"
 
@@ -1221,10 +1221,11 @@
 	priv = xpd->priv;
 	BUG_ON(!priv);
 	ignore_mask =
-	    PHONEDEV(xpd).offhook_state | ~(PHONEDEV(xpd).
-					    oht_pcm_pass) | ~(priv->
-							      search_fsk_pattern)
-	    | PHONEDEV(xpd).digital_inputs | PHONEDEV(xpd).digital_outputs;
+		PHONEDEV(xpd).offhook_state |
+		~(PHONEDEV(xpd).oht_pcm_pass) |
+		~(priv->search_fsk_pattern) |
+		PHONEDEV(xpd).digital_inputs |
+		PHONEDEV(xpd).digital_outputs;
 	for_each_line(xpd, i) {
 		struct dahdi_chan *chan = XPD_CHAN(xpd, i);
 		__u8 *writechunk = chan->writechunk;
@@ -1235,7 +1236,7 @@
 		if (writechunk[0] != 0x7F && writechunk[0] != 0) {
 			int j;
 
-			LINE_DBG(GENERAL, xpd, pos, "MSG:");
+			LINE_DBG(GENERAL, xpd, i, "MSG:");
 			for (j = 0; j < DAHDI_CHUNKSIZE; j++) {
 				if (debug)
 					printk(" %02X", writechunk[j]);

Modified: linux/trunk/drivers/dahdi/xpp/card_global.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_global.c?view=diff&rev=10429&r1=10428&r2=10429
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_global.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_global.c Wed Jan 11 11:04:36 2012
@@ -258,20 +258,25 @@
 		goto out;
 	}
 #if 0
-	XPD_DBG(REGS, xpd, "portno=%d writing=%d regnum=%d do_subreg=%d subreg=%d dataL=%d do_datah=%d dataH=%d\n", portno,	/* portno       */
-		writing,	/* writing      */
-		regnum, do_subreg,	/* use subreg   */
-		subreg,		/* subreg       */
-		data_low, do_datah,	/* use data_high */
+	XPD_DBG(REGS, xpd,
+		"portno=%d writing=%d regnum=%d do_subreg=%d subreg=%d dataL=%d do_datah=%d dataH=%d\n",
+		portno,		/* portno	*/
+		writing,	/* writing	*/
+		regnum,
+		do_subreg,	/* use subreg	*/
+		subreg,	/* subreg	*/
+		data_low,
+		do_datah,	/* use data_high*/
 		data_high);
 #endif
-	ret =
-	    xpp_register_request(xpd->xbus, xpd, portno, writing, regnum,
-				 do_subreg, subreg, data_low, do_datah,
-				 data_high, 1);
+	ret = xpp_register_request(xpd->xbus, xpd, portno,
+		writing, regnum, do_subreg, subreg,
+		data_low, do_datah, data_high, 1);
 out:
 	return ret;
 }
+
+#define	MAX_ARGS	10
 
 int parse_chip_command(xpd_t *xpd, char *cmdline)
 {
@@ -280,7 +285,6 @@
 	__u8 buf[MAX_PROC_WRITE];
 	char *str;
 	char *p;
-	static const int MAX_ARGS = 10;
 	char *argv[MAX_ARGS + 1];
 	int argc;
 	int i;




More information about the svn-commits mailing list