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

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Wed Jan 11 09:21:17 CST 2012


Author: tzafrir
Date: Wed Jan 11 09:21:13 2012
New Revision: 10426

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10426
Log:
xpp: style - add space after comma

* Applied via:
  sed -i -e '/"/!s/,\([^ \t]\)/, \1/g' "$@"

Signed-off-by: Oron Peled <oron.peled at xorcom.com>
Acked-By: Tzafrir Cohen <tzafrir.cohen at xorcom.com>

Modified:
    linux/trunk/drivers/dahdi/xpp/card_fxo.c
    linux/trunk/drivers/dahdi/xpp/card_fxs.c
    linux/trunk/drivers/dahdi/xpp/card_pri.c
    linux/trunk/drivers/dahdi/xpp/dahdi_debug.c
    linux/trunk/drivers/dahdi/xpp/mmapdrv.c
    linux/trunk/drivers/dahdi/xpp/parport_debug.c
    linux/trunk/drivers/dahdi/xpp/xbus-core.c
    linux/trunk/drivers/dahdi/xpp/xbus-core.h
    linux/trunk/drivers/dahdi/xpp/xbus-pcm.c
    linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c
    linux/trunk/drivers/dahdi/xpp/xdefs.h
    linux/trunk/drivers/dahdi/xpp/xpd.h
    linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
    linux/trunk/drivers/dahdi/xpp/xpp_dahdi.h
    linux/trunk/drivers/dahdi/xpp/xpp_usb.c
    linux/trunk/drivers/dahdi/xpp/xproto.c
    linux/trunk/drivers/dahdi/xpp/xproto.h

Modified: linux/trunk/drivers/dahdi/xpp/card_fxo.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_fxo.c?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxo.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxo.c Wed Jan 11 09:21:13 2012
@@ -78,7 +78,7 @@
 /* Shortcuts */
 #define	DAA_WRITE	1
 #define	DAA_READ	0
-#define	DAA_DIRECT_REQUEST(xbus,xpd,port,writing,reg,dL)	\
+#define	DAA_DIRECT_REQUEST(xbus, xpd, port, writing, reg, dL)	\
 	xpp_register_request((xbus), (xpd), (port), (writing), (reg), 0, 0, (dL), 0, 0, 0)
 
 /*---------------- FXO Protocol Commands ----------------------------------*/
@@ -157,11 +157,11 @@
  * LED counter values:
  *	n>1	: BLINK every n'th tick
  */
-#define	LED_COUNTER(priv,pos,color)	((priv)->led_counter[color][pos])
-#define	IS_BLINKING(priv,pos,color)	(LED_COUNTER(priv,pos,color) > 0)
-#define	MARK_BLINK(priv,pos,color,t)	((priv)->led_counter[color][pos] = (t))
-#define	MARK_OFF(priv,pos,color)	do { BIT_CLR((priv)->ledcontrol[color],(pos)); MARK_BLINK((priv),(pos),(color),0); } while (0)
-#define	MARK_ON(priv,pos,color)		do { BIT_SET((priv)->ledcontrol[color],(pos)); MARK_BLINK((priv),(pos),(color),0); } while (0)
+#define	LED_COUNTER(priv, pos, color)	((priv)->led_counter[color][pos])
+#define	IS_BLINKING(priv, pos, color)	(LED_COUNTER(priv, pos, color) > 0)
+#define	MARK_BLINK(priv, pos, color, t)	((priv)->led_counter[color][pos] = (t))
+#define	MARK_OFF(priv, pos, color)	do { BIT_CLR((priv)->ledcontrol[color], (pos)); MARK_BLINK((priv), (pos), (color), 0); } while (0)
+#define	MARK_ON(priv, pos, color)		do { BIT_SET((priv)->ledcontrol[color], (pos)); MARK_BLINK((priv), (pos), (color), 0); } while (0)
 
 #define	LED_BLINK_RING			(1000/8)	/* in ticks */
 
@@ -781,7 +781,7 @@
 
 static int FXO_card_ioctl(xpd_t *xpd, int pos, unsigned int cmd, unsigned long arg)
 {
-	int			i,ret;
+	int			i, ret;
 	unsigned char		echotune_data[ARRAY_SIZE(echotune_regs)];
 
 	BUG_ON(!xpd);
@@ -1187,8 +1187,8 @@
 	for_each_line(xpd, i) {
 		if (!IS_SET(PHONEDEV(xpd).digital_outputs, i) && !IS_SET(PHONEDEV(xpd).digital_inputs, i))
 			len += sprintf(page + len, "  %d%d ",
-				IS_BLINKING(priv,i,LED_GREEN),
-				IS_BLINKING(priv,i,LED_RED));
+				IS_BLINKING(priv, i, LED_GREEN),
+				IS_BLINKING(priv, i, LED_RED));
 	}
 	len += sprintf(page + len, "\nBattery-Data:");
 	len += sprintf(page + len, "\n\t%-17s: ", "voltage");

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=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_fxs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_fxs.c Wed Jan 11 09:21:13 2012
@@ -68,9 +68,9 @@
 /* Shortcuts */
 #define	SLIC_WRITE	1
 #define	SLIC_READ	0
-#define	SLIC_DIRECT_REQUEST(xbus,xpd,port,writing,reg,dL)	\
+#define	SLIC_DIRECT_REQUEST(xbus, xpd, port, writing, reg, dL)	\
 	xpp_register_request((xbus), (xpd), (port), (writing), (reg), 0, 0, (dL), 0, 0, 0)
-#define	SLIC_INDIRECT_REQUEST(xbus,xpd,port,writing,reg,dL,dH)	\
+#define	SLIC_INDIRECT_REQUEST(xbus, xpd, port, writing, reg, dL, dH)	\
 	xpp_register_request((xbus), (xpd), (port), (writing), 0x1E, 1, (reg), (dL), 1, (dH), 0)
 
 #define	VALID_PORT(port)	(((port) >= 0 && (port) <= 7) || (port) == PORT_BROADCAST)
@@ -148,11 +148,11 @@
  * LED counter values:
  *	n>1	: BLINK every n'th tick
  */
-#define	LED_COUNTER(priv,pos,color)	((priv)->led_counter[color][pos])
-#define	IS_BLINKING(priv,pos,color)	(LED_COUNTER(priv,pos,color) > 0)
-#define	MARK_BLINK(priv,pos,color,t)	((priv)->led_counter[color][pos] = (t))
-#define	MARK_OFF(priv,pos,color)	do { BIT_CLR((priv)->ledcontrol[color],(pos)); MARK_BLINK((priv),(pos),(color),0); } while (0)
-#define	MARK_ON(priv,pos,color)		do { BIT_SET((priv)->ledcontrol[color],(pos)); MARK_BLINK((priv),(pos),(color),0); } while (0)
+#define	LED_COUNTER(priv, pos, color)	((priv)->led_counter[color][pos])
+#define	IS_BLINKING(priv, pos, color)	(LED_COUNTER(priv, pos, color) > 0)
+#define	MARK_BLINK(priv, pos, color, t)	((priv)->led_counter[color][pos] = (t))
+#define	MARK_OFF(priv, pos, color)	do { BIT_CLR((priv)->ledcontrol[color], (pos)); MARK_BLINK((priv), (pos), (color), 0); } while (0)
+#define	MARK_ON(priv, pos, color)		do { BIT_SET((priv)->ledcontrol[color], (pos)); MARK_BLINK((priv), (pos), (color), 0); } while (0)
 
 #define	LED_BLINK_RING			(1000/8)	/* in ticks */
 

Modified: linux/trunk/drivers/dahdi/xpp/card_pri.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/card_pri.c?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/card_pri.c (original)
+++ linux/trunk/drivers/dahdi/xpp/card_pri.c Wed Jan 11 09:21:13 2012
@@ -331,7 +331,7 @@
 #define	NO_DCHAN	(0)
 #define	DCHAN(p)	((p)->chanconfig_dchan)
 #define	VALID_DCHAN(p)	(DCHAN(p) != NO_DCHAN)
-#define	SET_DCHAN(p,d)	do { DCHAN(p) = (d); } while (0);
+#define	SET_DCHAN(p, d)	do { DCHAN(p) = (d); } while (0);
 
 	byte				cas_rs_e[NUM_CAS_RS_E];
 	byte				cas_ts_e[NUM_CAS_RS_E];
@@ -786,7 +786,7 @@
 	return 0;
 }
 
-#define	VALID_CONFIG(bit,flg,str)	[bit] = { .flags = flg, .name = str }
+#define	VALID_CONFIG(bit, flg, str)	[bit] = { .flags = flg, .name = str }
 
 static const struct {
 	const char	*name;

Modified: linux/trunk/drivers/dahdi/xpp/dahdi_debug.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/dahdi_debug.c?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/dahdi_debug.c (original)
+++ linux/trunk/drivers/dahdi/xpp/dahdi_debug.c Wed Jan 11 09:21:13 2012
@@ -21,7 +21,7 @@
  */
 #include <linux/version.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
 #  warning "This module is tested only with 2.6 kernels"
 #endif
 

Modified: linux/trunk/drivers/dahdi/xpp/mmapdrv.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/mmapdrv.c?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/mmapdrv.c (original)
+++ linux/trunk/drivers/dahdi/xpp/mmapdrv.c Wed Jan 11 09:21:13 2012
@@ -516,7 +516,7 @@
 	xframe_cache = kmem_cache_create("xframe_cache",
 			sizeof(xframe_t) + XFRAME_DATASIZE,
 			0, 0,
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
 			NULL,
 #endif
 			NULL);

Modified: linux/trunk/drivers/dahdi/xpp/parport_debug.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/parport_debug.c?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/parport_debug.c (original)
+++ linux/trunk/drivers/dahdi/xpp/parport_debug.c Wed Jan 11 09:21:13 2012
@@ -21,7 +21,7 @@
  */
 #include <linux/version.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
 #  warning "This module is tested only with 2.6 kernels"
 #endif
 

Modified: linux/trunk/drivers/dahdi/xpp/xbus-core.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-core.c?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-core.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-core.c Wed Jan 11 09:21:13 2012
@@ -21,7 +21,7 @@
  */
 #include <linux/version.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
 #  warning "This module is tested only with 2.6 kernels"
 #endif
 
@@ -314,8 +314,8 @@
 		do_print = 0;
 		if (debug == DBG_ANY)
 			do_print = 1;
-		else if (XPACKET_OP(pack) != XPROTO_NAME(GLOBAL,PCM_READ) &&
-			XPACKET_OP(pack) != XPROTO_NAME(GLOBAL,PCM_WRITE))
+		else if (XPACKET_OP(pack) != XPROTO_NAME(GLOBAL, PCM_READ) &&
+			XPACKET_OP(pack) != XPROTO_NAME(GLOBAL, PCM_WRITE))
 			do_print = 1;
 		else if (debug & DBG_PCM) {
 			static int	rate_limit;
@@ -550,7 +550,7 @@
 {
 	if (unit > MAX_UNIT || subunit > MAX_SUBUNIT)
 		return NULL;
-	return xbus->xpds[XPD_IDX(unit,subunit)];
+	return xbus->xpds[XPD_IDX(unit, subunit)];
 }
 
 int xbus_xpd_bind(xbus_t *xbus, xpd_t *xpd, int unit, int subunit)
@@ -559,7 +559,7 @@
 	unsigned long	flags;
 
 	BUG_ON(!xbus);
-	xpd_num = XPD_IDX(unit,subunit);
+	xpd_num = XPD_IDX(unit, subunit);
 	XBUS_DBG(DEVICES, xbus, "XPD #%d\n", xpd_num);
 	spin_lock_irqsave(&xbus->lock, flags);
 	if (!VALID_XPD_NUM(xpd_num)) {
@@ -1014,7 +1014,7 @@
  * it returns only when all XPD's on the bus are detected and
  * initialized.
  */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
 static void xbus_populate(struct work_struct *work)
 {
 	struct xbus_workqueue	*worker = container_of(work, struct xbus_workqueue, xpds_init_work);
@@ -1101,7 +1101,7 @@
 	}
 	XBUS_DBG(DEVICES, xbus, "\n");
 	/* Initialize the work. (adapt to kernel API changes). */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20)
 	INIT_WORK(&worker->xpds_init_work, xbus_populate);
 #else
 	INIT_WORK(&worker->xpds_init_work, xbus_populate, worker);

Modified: linux/trunk/drivers/dahdi/xpp/xbus-core.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-core.h?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-core.h (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-core.h Wed Jan 11 09:21:13 2012
@@ -140,7 +140,7 @@
 
 /*
  * Allocate/Free an xframe from pools of empty xframes.
- * Calls to {get,put}_xframe are wrapped in
+ * Calls to {get, put}_xframe are wrapped in
  * the macros bellow, so we take/return it
  * to the correct pool.
  */
@@ -316,7 +316,7 @@
 /*
  * Map: unit+subunit <--> index in xbus->xpds[]
  */
-#define	XPD_IDX(unit,subunit)	((unit) * MAX_SUBUNIT + (subunit))
+#define	XPD_IDX(unit, subunit)	((unit) * MAX_SUBUNIT + (subunit))
 #define	XBUS_UNIT(idx)		((idx) / MAX_SUBUNIT)
 #define	XBUS_SUBUNIT(idx)	((idx) % MAX_SUBUNIT)
 

Modified: linux/trunk/drivers/dahdi/xpp/xbus-pcm.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-pcm.c?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-pcm.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-pcm.c Wed Jan 11 09:21:13 2012
@@ -21,7 +21,7 @@
  */
 #include <linux/version.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
 #  warning "This module is tested only with 2.6 kernels"
 #endif
 
@@ -166,7 +166,7 @@
 	}
 }
 #else
-#define	sample_tick(x,y)
+#define	sample_tick(x, y)
 #endif
 
 /*
@@ -981,7 +981,7 @@
 		pack = (xpacket_t *)p;
 		len = XPACKET_LEN(pack);
 		/* Sanity checks */
-		if (unlikely(XPACKET_OP(pack) != XPROTO_NAME(GLOBAL,PCM_READ))) {
+		if (unlikely(XPACKET_OP(pack) != XPROTO_NAME(GLOBAL, PCM_READ))) {
 			static int	rate_limit;
 
 			if ((rate_limit++ % 1003) == 0) {

Modified: linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xbus-sysfs.c Wed Jan 11 09:21:13 2012
@@ -21,7 +21,7 @@
  */
 #include <linux/version.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
 #  warning "This module is tested only with 2.6 kernels"
 #endif
 
@@ -267,7 +267,7 @@
 	return len;
 }
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
 #define xbus_attr(field, format_string)                                    \
 static ssize_t                                                             \
 field##_show(struct device *dev, struct device_attribute *attr, char *buf) \
@@ -339,7 +339,7 @@
 		XBUS_ADD_UEVENT_VAR("XBUS_NAME=%s", xbus->busname);	\
 	} while (0)
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
 #define XBUS_ADD_UEVENT_VAR(fmt, val...)			\
 	do {							\
 		int err = add_uevent_var(envp, num_envp, &i,	\

Modified: linux/trunk/drivers/dahdi/xpp/xdefs.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xdefs.h?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xdefs.h (original)
+++ linux/trunk/drivers/dahdi/xpp/xdefs.h Wed Jan 11 09:21:13 2012
@@ -56,9 +56,9 @@
 #ifndef	BIT	/* added in 2.6.24 */
 #define	BIT(i)		(1UL << (i))
 #endif
-#define	BIT_SET(x,i)	((x) |= BIT(i))
-#define	BIT_CLR(x,i)	((x) &= ~BIT(i))
-#define	IS_SET(x,i)	(((x) & BIT(i)) != 0)
+#define	BIT_SET(x, i)	((x) |= BIT(i))
+#define	BIT_CLR(x, i)	((x) &= ~BIT(i))
+#define	IS_SET(x, i)	(((x) & BIT(i)) != 0)
 #define	BITMASK(i)	(((u64)1 << (i)) - 1)
 
 #define	MAX_PROC_WRITE	100	/* Largest buffer we allow writing our /proc files */
@@ -102,7 +102,7 @@
 #ifdef __KERNEL__
 
 /* Kernel versions... */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
 #define	KMEM_CACHE_T	kmem_cache_t
 #else
 #define	KMEM_CACHE_T	struct kmem_cache
@@ -117,38 +117,38 @@
 /*
  * Hotplug replaced with uevent in 2.6.16
  */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
 #define	OLD_HOTPLUG_SUPPORT	// for older kernels
 #endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
 #define	OLD_HOTPLUG_SUPPORT_269// for way older kernels
 #endif
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
-#define	DEVICE_ATTR_READER(name,dev,buf)	\
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
+#define	DEVICE_ATTR_READER(name, dev, buf)	\
 		ssize_t name(struct device *dev, struct device_attribute *attr, char *buf)
-#define	DEVICE_ATTR_WRITER(name,dev,buf, count)	\
+#define	DEVICE_ATTR_WRITER(name, dev, buf, count)	\
 		ssize_t name(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
 #else
-#define	DEVICE_ATTR_READER(name,dev,buf)	\
+#define	DEVICE_ATTR_READER(name, dev, buf)	\
 		ssize_t name(struct device *dev, char *buf)
-#define	DEVICE_ATTR_WRITER(name,dev,buf, count)	\
+#define	DEVICE_ATTR_WRITER(name, dev, buf, count)	\
 		ssize_t name(struct device *dev, const char *buf, size_t count)
 #endif
-#define	DRIVER_ATTR_READER(name,drv,buf)	\
+#define	DRIVER_ATTR_READER(name, drv, buf)	\
 		ssize_t name(struct device_driver *drv, char * buf)
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
 #define	SET_PROC_DIRENTRY_OWNER(p)	do { (p)->owner = THIS_MODULE; } while (0);
 #else
 #define	SET_PROC_DIRENTRY_OWNER(p)	do { } while (0);
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
 /* Also don't define this for later RHEL >= 5.2 . hex_asc is from the
  * same linux-2.6-net-infrastructure-updates-to-mac80211-iwl4965.patch
  * as is the bool typedef. */
-#if LINUX_VERSION_CODE != KERNEL_VERSION(2,6,18)  || !  defined(hex_asc)
+#if LINUX_VERSION_CODE != KERNEL_VERSION(2, 6, 18)  || !  defined(hex_asc)
 typedef int			bool;
 #endif
 #endif

Modified: linux/trunk/drivers/dahdi/xpp/xpd.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xpd.h?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpd.h (original)
+++ linux/trunk/drivers/dahdi/xpp/xpd.h Wed Jan 11 09:21:13 2012
@@ -31,7 +31,7 @@
 #include <linux/device.h>
 #include <linux/version.h>
 #include <asm/atomic.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26)
 #include <linux/semaphore.h>
 #else
 #include <asm/semaphore.h>
@@ -42,9 +42,9 @@
 #include <dahdi/kernel.h>
 
 #ifdef __KERNEL__
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 14)
 /* also added in RHEL kernels with the OpenInfiniband backport: */
-#if LINUX_VERSION_CODE != KERNEL_VERSION(2,6,9) || !defined(DEFINE_SPINLOCK)
+#if LINUX_VERSION_CODE != KERNEL_VERSION(2, 6, 9) || !defined(DEFINE_SPINLOCK)
 typedef	unsigned gfp_t;		/* Added in 2.6.14 */
 #endif
 #endif
@@ -54,28 +54,28 @@
  * bool is now defined as a proper boolean type (gcc _Bool)
  * but the command line parsing framework handles it as int.
  */
-#define	DEF_PARM_BOOL(name,init,perm,desc)	\
+#define	DEF_PARM_BOOL(name, init, perm, desc)	\
 	int name = init;	\
 	module_param(name, bool, perm);		\
 	MODULE_PARM_DESC(name, desc " [default " #init "]")
 
-#define	DEF_PARM(type,name,init,perm,desc)	\
+#define	DEF_PARM(type, name, init, perm, desc)	\
 	type name = init;	\
 	module_param(name, type, perm);		\
 	MODULE_PARM_DESC(name, desc " [default " #init "]")
 
-#if	LINUX_VERSION_CODE	< KERNEL_VERSION(2,6,10)
+#if	LINUX_VERSION_CODE	< KERNEL_VERSION(2, 6, 10)
 /*
  * Old 2.6 kernels had module_param_array() macro that receive the counter
  * by value.
  */
-#define	DEF_ARRAY(type,name,count,init,desc)	\
+#define	DEF_ARRAY(type, name, count, init, desc)	\
 	unsigned int name ## _num_values;	\
 	type name[count] = { [0 ... ((count)-1)] = (init) };			\
 	module_param_array(name, type, name ## _num_values, 0644);	\
 	MODULE_PARM_DESC(name, desc " ( 1-" __MODULE_STRING(count) ")")
 #else
-#define	DEF_ARRAY(type,name,count,init,desc)	\
+#define	DEF_ARRAY(type, name, count, init, desc)	\
 	unsigned int name ## _num_values;	\
 	type name[count] = {[0 ... ((count)-1)] = init};			\
 	module_param_array(name, type, &name ## _num_values, 0644);	\
@@ -148,7 +148,7 @@
 	const struct phoneops	*phoneops;	/* Card level operations */
 	struct dahdi_span	span;
 	struct dahdi_chan	*chans[32];
-#define	XPD_CHAN(xpd,chan)	(PHONEDEV(xpd).chans[(chan)])
+#define	XPD_CHAN(xpd, chan)	(PHONEDEV(xpd).chans[(chan)])
 	struct dahdi_echocan_state *ec[32];
 
 	int		channels;
@@ -228,7 +228,7 @@
 	unsigned int	timer_count;
 };
 
-#define	for_each_line(xpd,i)	for ((i) = 0; (i) < PHONEDEV(xpd).channels; (i)++)
+#define	for_each_line(xpd, i)	for ((i) = 0; (i) < PHONEDEV(xpd).channels; (i)++)
 #define	IS_BRI(xpd)		((xpd)->type == XPD_TYPE_BRI)
 #define	TICK_TOLERANCE		500 /* usec */
 

Modified: linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xpp_dahdi.c Wed Jan 11 09:21:13 2012
@@ -26,7 +26,7 @@
  */
 #include <linux/version.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
 #  warning "This module is tested only with 2.6 kernels"
 #endif
 
@@ -76,7 +76,7 @@
  */
 static int parport_xbuses[2] = { 0, 1 };
 unsigned int parport_xbuses_num_values;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 9)
 module_param_array(parport_xbuses, int, &parport_xbuses_num_values, 0577);
 #else
 module_param_array(parport_xbuses, int, parport_xbuses_num_values, 0577);
@@ -1095,7 +1095,7 @@
 		dahdi_alarm_notify(&PHONEDEV(xpd).span);
 		XPD_DBG(DEVICES, xpd, "Queuing DAHDI_EVENT_REMOVED on all channels to ask user to release them\n");
 		for (j=0; j<PHONEDEV(xpd).span.channels; j++) {
-			dahdi_qevent_lock(XPD_CHAN(xpd, j),DAHDI_EVENT_REMOVED);
+			dahdi_qevent_lock(XPD_CHAN(xpd, j), DAHDI_EVENT_REMOVED);
 		}
 	}
 }

Modified: linux/trunk/drivers/dahdi/xpp/xpp_dahdi.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xpp_dahdi.h?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpp_dahdi.h (original)
+++ linux/trunk/drivers/dahdi/xpp/xpp_dahdi.h Wed Jan 11 09:21:13 2012
@@ -52,7 +52,7 @@
 int total_registered_spans(void);
 void oht_pcm(xpd_t *xpd, int pos, bool pass);
 void mark_offhook(xpd_t *xpd, int pos, bool to_offhook);
-#define	IS_OFFHOOK(xpd,pos)	IS_SET((xpd)->phonedev.offhook_state, (pos))
+#define	IS_OFFHOOK(xpd, pos)	IS_SET((xpd)->phonedev.offhook_state, (pos))
 void notify_rxsig(xpd_t *xpd, int pos, enum dahdi_rxsig rxsig);
 
 #ifdef CONFIG_PROC_FS

Modified: linux/trunk/drivers/dahdi/xpp/xpp_usb.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xpp_usb.c?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xpp_usb.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xpp_usb.c Wed Jan 11 09:21:13 2012
@@ -64,7 +64,7 @@
 
 /* FIXME: A flag that was deprecated at some point, and rather useless */
 /* anyway. Only used in the code or-ed to other flags                  */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
 #  define URB_ASYNC_UNLINK 0
 #endif
 /* Get a minor range for your devices from the usb maintainer */
@@ -74,7 +74,7 @@
 #define	PROC_USBXPP_SUMMARY	"xpp_usb"
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
 #  warning "This module is tested only with 2.6 kernels"
 #endif
 
@@ -85,13 +85,13 @@
 	usb_buffer_free(dev, size, addr, dma)
 #endif
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)
 #  undef USB_FIELDS_MISSING
 #else
 #  define USB_FIELDS_MISSING
 
 #  define USB_MAX_STRING	128
-#  define USB_GET_STRING(udev,field,buf)		\
+#  define USB_GET_STRING(udev, field, buf)		\
 	do {						\
 		if ((udev)->descriptor.field) {		\
 			char	tmp[USB_MAX_STRING];	\
@@ -99,7 +99,7 @@
 				snprintf((buf), USB_MAX_STRING, "%s", tmp); \
 		}					\
 	} while (0);
-#  define USB_GET_IFACE_NAME(udev,iface,buf)		\
+#  define USB_GET_IFACE_NAME(udev, iface, buf)		\
 	do {						\
 		if ((iface)->desc.iInterface) {		\
 			char	tmp[USB_MAX_STRING];	\
@@ -255,7 +255,7 @@
  * Debian-Etch and Centos5 are using 2.6.18 for now (lucky for us).
  * Fedora6 jumped from 2.6.18 to 2.6.20. So far luck is on our side ;-)
  */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
 #define	USB_PASS_CB(u)	struct urb *u, struct pt_regs *regs
 #else
 #define	USB_PASS_CB(u)	struct urb *u
@@ -511,7 +511,7 @@
 
 /* usb specific object needed to register this driver with the usb subsystem */
 static struct usb_driver xusb_driver = {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
 	.owner =	THIS_MODULE,
 #endif
 	.name =		"xpp_usb",
@@ -550,7 +550,7 @@
 	.name =		"usb/xpp_usb%d",
 	.fops =		&xusb_fops,
 /* FIXME: The sysfs class interfase seems to have chaged around here */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 15)
 	.mode =		S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH,
 #endif
 	.minor_base =	USB_SKEL_MINOR_BASE,
@@ -639,7 +639,7 @@
  * being called from the probe we may already have the lock to udev (the Usb DEVice).
  * Thus we call the internal __usb_reset_device instead.
  */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10)
 #define	DO_USB_RESET_DEVICE(dev)	__usb_reset_device(dev)
 #else
 #define	DO_USB_RESET_DEVICE(dev)	usb_reset_device(dev)
@@ -677,7 +677,7 @@
 	}
 	if (!model_info) {
 		ERR("Missing endpoint setup for this device %d:%d\n",
-				udev->descriptor.idVendor,udev->descriptor.idProduct);
+				udev->descriptor.idVendor, udev->descriptor.idProduct);
 		retval = -ENODEV;
 		goto probe_failed;
 	}
@@ -990,12 +990,12 @@
 	INFO("revision %s\n", XPP_VERSION);
 	xusb_cache = kmem_cache_create("xusb_cache",
 			sizeof(xframe_t) + XFRAME_DATASIZE,
-#if (LINUX_VERSION_CODE == KERNEL_VERSION(2,6,22)) && defined(CONFIG_SLUB)
+#if (LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 22)) && defined(CONFIG_SLUB)
 			0, SLAB_STORE_USER,
 #else
 			0, 0,
 #endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 23)
 			NULL,
 #endif
 			NULL);

Modified: linux/trunk/drivers/dahdi/xpp/xproto.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xproto.c?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xproto.c (original)
+++ linux/trunk/drivers/dahdi/xpp/xproto.c Wed Jan 11 09:21:13 2012
@@ -219,7 +219,7 @@
 		pack = (xpacket_t *)p;
 		len = XPACKET_LEN(pack);
 		/* Sanity checks */
-		if (unlikely(XPACKET_OP(pack) == XPROTO_NAME(GLOBAL,PCM_READ))) {
+		if (unlikely(XPACKET_OP(pack) == XPROTO_NAME(GLOBAL, PCM_READ))) {
 			static int	rate_limit;
 
 			if ((rate_limit++ % 1003) == 0) {

Modified: linux/trunk/drivers/dahdi/xpp/xproto.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/xpp/xproto.h?view=diff&rev=10426&r1=10425&r2=10426
==============================================================================
--- linux/trunk/drivers/dahdi/xpp/xproto.h (original)
+++ linux/trunk/drivers/dahdi/xpp/xproto.h Wed Jan 11 09:21:13 2012
@@ -92,49 +92,49 @@
 
 bool valid_xpd_addr(const struct xpd_addr *addr);
 
-#define	XPROTO_NAME(card,op)	card ## _ ## op
-#define	XPROTO_HANDLER(card,op)	XPROTO_NAME(card,op ## _handler)
-#define	XPROTO_CALLER(card,op)	XPROTO_NAME(card,op ## _send)
-
-#define	HANDLER_DEF(card,op)	\
-	static int XPROTO_HANDLER(card,op) (	\
+#define	XPROTO_NAME(card, op)	card ## _ ## op
+#define	XPROTO_HANDLER(card, op)	XPROTO_NAME(card, op ## _handler)
+#define	XPROTO_CALLER(card, op)	XPROTO_NAME(card, op ## _send)
+
+#define	HANDLER_DEF(card, op)	\
+	static int XPROTO_HANDLER(card, op) (	\
 		xbus_t *xbus,			\
 		xpd_t *xpd,			\
 		const xproto_entry_t *cmd,	\
 		xpacket_t *pack)
 
-#define	CALL_PROTO(card,op, ...)	XPROTO_CALLER(card,op)( __VA_ARGS__ )
-
-#define	DECLARE_CMD(card,op, ...)	\
+#define	CALL_PROTO(card, op, ...)	XPROTO_CALLER(card, op)( __VA_ARGS__ )
+
+#define	DECLARE_CMD(card, op, ...)	\
 	int CALL_PROTO(card, op, xbus_t *xbus, xpd_t *xpd, ## __VA_ARGS__ )
 
 #define	HOSTCMD(card, op, ...)					\
 		DECLARE_CMD(card, op, ## __VA_ARGS__ )
 
-#define	RPACKET_NAME(card,op)	XPROTO_NAME(RPACKET_ ## card, op)
-#define	RPACKET_TYPE(card,op)	struct RPACKET_NAME(card, op)
-
-#define	DEF_RPACKET_DATA(card,op, ...)		\
-	RPACKET_TYPE(card,op) {			\
+#define	RPACKET_NAME(card, op)	XPROTO_NAME(RPACKET_ ## card, op)
+#define	RPACKET_TYPE(card, op)	struct RPACKET_NAME(card, op)
+
+#define	DEF_RPACKET_DATA(card, op, ...)		\
+	RPACKET_TYPE(card, op) {			\
 		struct xpacket_header	head;	\
 		__VA_ARGS__			\
 	} PACKED
 #define	RPACKET_HEADERSIZE		sizeof(struct xpacket_header)
-#define	RPACKET_FIELD(p,card,op,field)	(((RPACKET_TYPE(card,op) *)(p))->field)
-#define	RPACKET_SIZE(card,op)		sizeof(RPACKET_TYPE(card,op))
-
-#define	XENTRY(prototab,module,op)			\
-	[ XPROTO_NAME(module,op) ] = {			\
-		.handler = XPROTO_HANDLER(module,op),	\
-		.datalen = RPACKET_SIZE(module,op),	\
+#define	RPACKET_FIELD(p, card, op, field)	(((RPACKET_TYPE(card, op) *)(p))->field)
+#define	RPACKET_SIZE(card, op)		sizeof(RPACKET_TYPE(card, op))
+
+#define	XENTRY(prototab, module, op)			\
+	[ XPROTO_NAME(module, op) ] = {			\
+		.handler = XPROTO_HANDLER(module, op),	\
+		.datalen = RPACKET_SIZE(module, op),	\
 		.name = #op,				\
 		.table = &PROTO_TABLE(prototab)		\
 	}
 
 #define	XPACKET_INIT(p, card, op, to, pcm, pcmslot)		\
 		do {						\
-			XPACKET_OP(p) = XPROTO_NAME(card,op);	\
-			XPACKET_LEN(p) = RPACKET_SIZE(card,op);	\
+			XPACKET_OP(p) = XPROTO_NAME(card, op);	\
+			XPACKET_LEN(p) = RPACKET_SIZE(card, op);	\
 			XPACKET_IS_PCM(p) = (pcm);		\
 			XPACKET_PCMSLOT(p) = (pcmslot);		\
 			XPACKET_RESERVED(p) = 0;		\
@@ -146,7 +146,7 @@
 
 #define	XFRAME_NEW_CMD(frm, p, xbus, card, op, to)		\
 	do {							\
-		int		pack_len = RPACKET_SIZE(card,op);	\
+		int		pack_len = RPACKET_SIZE(card, op);	\
 								\
 		if (!XBUS_FLAGS(xbus, CONNECTED))		\
 			return -ENODEV;				\
@@ -191,7 +191,7 @@
 } PACKED reg_cmd_t;
 
 /* Shortcut access macros */
-#define	REG_FIELD(regptr,member)	((regptr)->alt.r.member)
+#define	REG_FIELD(regptr, member)	((regptr)->alt.r.member)
 #define	REG_XDATA(regptr)		((regptr)->alt.d.xdata)
 
 #ifdef __KERNEL__
@@ -283,7 +283,7 @@
 #include "card_pri.h"
 
 
-#define	MEMBER(card,op)	RPACKET_TYPE(card,op)	RPACKET_NAME(card,op)
+#define	MEMBER(card, op)	RPACKET_TYPE(card, op)	RPACKET_NAME(card, op)
 
 struct xpacket {
 	struct xpacket_header	head;




More information about the dahdi-commits mailing list