[svn-commits] sruffell: branch linux/sruffell/dahdi-linux-withidle r7503 - /linux/team/sruf...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Nov 6 14:33:27 CST 2009


Author: sruffell
Date: Fri Nov  6 14:33:16 2009
New Revision: 7503

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7503
Log:
voicebus: Remove sdi member from 'struct voicebus'

This is only used during startup so we don't need to carry it around in the
structure at all times.

Modified:
    linux/team/sruffell/dahdi-linux-withidle/drivers/dahdi/voicebus/voicebus.c

Modified: linux/team/sruffell/dahdi-linux-withidle/drivers/dahdi/voicebus/voicebus.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/dahdi-linux-withidle/drivers/dahdi/voicebus/voicebus.c?view=diff&rev=7503&r1=7502&r2=7503
==============================================================================
--- linux/team/sruffell/dahdi-linux-withidle/drivers/dahdi/voicebus/voicebus.c (original)
+++ linux/team/sruffell/dahdi-linux-withidle/drivers/dahdi/voicebus/voicebus.c Fri Nov  6 14:33:16 2009
@@ -184,8 +184,6 @@
 	struct completion stopped_completion;
 	/*! Flags */
 	unsigned long flags;
-	/* \todo see about removing this... */
-	u32 sdi;
 	/*! Number of tx buffers to queue up before enabling interrupts. */
 	unsigned int 	min_tx_buffer_count;
 };
@@ -514,30 +512,30 @@
 }
 
 static int
-__vb_sdi_clk(struct voicebus *vb)
+__vb_sdi_clk(struct voicebus *vb, u32 *sdi)
 {
 	unsigned int ret;
-	vb->sdi &= ~CSR9_MDC;
-	__vb_setctl(vb, 0x0048, vb->sdi);
+	*sdi &= ~CSR9_MDC;
+	__vb_setctl(vb, 0x0048, *sdi);
 	ret = __vb_getctl(vb, 0x0048);
-	vb->sdi |= CSR9_MDC;
-	__vb_setctl(vb, 0x0048, vb->sdi);
+	*sdi |= CSR9_MDC;
+	__vb_setctl(vb, 0x0048, *sdi);
 	return (ret & CSR9_MDI) ? 1 : 0;
 }
 
 static void
-__vb_sdi_sendbits(struct voicebus *vb, u32 bits, int count)
-{
-	vb->sdi &= ~CSR9_MMC;
-	__vb_setctl(vb, 0x0048, vb->sdi);
+__vb_sdi_sendbits(struct voicebus *vb, u32 bits, int count, u32 *sdi)
+{
+	*sdi &= ~CSR9_MMC;
+	__vb_setctl(vb, 0x0048, *sdi);
 	while (count--) {
 
 		if (bits & (1 << count))
-			vb->sdi |= CSR9_MDO;
+			*sdi |= CSR9_MDO;
 		else
-			vb->sdi &= ~CSR9_MDO;
-
-		__vb_sdi_clk(vb);
+			*sdi &= ~CSR9_MDO;
+
+		__vb_sdi_clk(vb, sdi);
 	}
 }
 
@@ -546,13 +544,14 @@
 {
 	LOCKS_VOICEBUS;
 	u32 bits;
+	u32 sdi = 0;
 	/* Send preamble */
 	bits = 0xffffffff;
 	VBLOCK(vb);
-	__vb_sdi_sendbits(vb, bits, 32);
+	__vb_sdi_sendbits(vb, bits, 32, &sdi);
 	bits = (0x5 << 12) | (1 << 7) | (addr << 2) | 0x2;
-	__vb_sdi_sendbits(vb, bits, 16);
-	__vb_sdi_sendbits(vb, val, 16);
+	__vb_sdi_sendbits(vb, bits, 16, &sdi);
+	__vb_sdi_sendbits(vb, val, 16, &sdi);
 	VBUNLOCK(vb);
 }
 




More information about the svn-commits mailing list