diff mbox

[PATCHv2,01/18] DSPBRIDGE: Fix compile break for WCD debug mask

Message ID 1261016163-11091-2-git-send-email-omar.ramirez@ti.com (mailing list archive)
State Awaiting Upstream, archived
Headers show

Commit Message

omar ramirez Dec. 17, 2009, 2:15 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/dsp/bridge/pmgr/wcd.c b/drivers/dsp/bridge/pmgr/wcd.c
index bb28cd2..3fb5208 100644
--- a/drivers/dsp/bridge/pmgr/wcd.c
+++ b/drivers/dsp/bridge/pmgr/wcd.c
@@ -144,46 +144,6 @@ 
 #define MAX_STREAMS     16
 #define MAX_BUFS	64
 
-static inline void __cp_fm_usr(void *to, const void __user *from,
-			       DSP_STATUS *err, unsigned long bytes)
-{
-	if (DSP_FAILED(*err))
-		return;
-
-	if (unlikely(!from)) {
-		*err = DSP_EPOINTER;
-		return;
-	}
-
-	if (unlikely(copy_from_user(to, from, bytes))) {
-		GT_2trace(WCD_debugMask, GT_7CLASS,
-			  "%s failed, from=0x%08x\n", __func__, from);
-		*err = DSP_EPOINTER;
-	}
-}
-#define cp_fm_usr(to, from, err, n)				\
-	__cp_fm_usr(to, from, &(err), (n) * sizeof(*(to)))
-
-static inline void __cp_to_usr(void __user *to, const void *from,
-			       DSP_STATUS *err, unsigned long bytes)
-{
-	if (DSP_FAILED(*err))
-		return;
-
-	if (unlikely(!to)) {
-		*err = DSP_EPOINTER;
-		return;
-	}
-
-	if (unlikely(copy_to_user(to, from, bytes))) {
-		GT_2trace(WCD_debugMask, GT_7CLASS,
-			  "%s failed, to=0x%08x\n", __func__, to);
-		*err = DSP_EPOINTER;
-	}
-}
-#define cp_to_usr(to, from, err, n)				\
-	__cp_to_usr(to, from, &(err), (n) * sizeof(*(from)))
-
 /* Device IOCtl function pointer */
 struct WCD_Cmd {
 	u32(*fxn)(union Trapped_Args *args);
@@ -265,6 +225,46 @@  static struct WCD_Cmd WCD_cmdTable[] = {
 	{CMMWRAP_GetInfo, CMD_CMM_GETINFO_OFFSET}
 };
 
+static inline void __cp_fm_usr(void *to, const void __user *from,
+			       DSP_STATUS *err, unsigned long bytes)
+{
+	if (DSP_FAILED(*err))
+		return;
+
+	if (unlikely(!from)) {
+		*err = DSP_EPOINTER;
+		return;
+	}
+
+	if (unlikely(copy_from_user(to, from, bytes))) {
+		GT_2trace(WCD_debugMask, GT_7CLASS,
+			  "%s failed, from=0x%08x\n", __func__, from);
+		*err = DSP_EPOINTER;
+	}
+}
+#define cp_fm_usr(to, from, err, n)				\
+	__cp_fm_usr(to, from, &(err), (n) * sizeof(*(to)))
+
+static inline void __cp_to_usr(void __user *to, const void *from,
+			       DSP_STATUS *err, unsigned long bytes)
+{
+	if (DSP_FAILED(*err))
+		return;
+
+	if (unlikely(!to)) {
+		*err = DSP_EPOINTER;
+		return;
+	}
+
+	if (unlikely(copy_to_user(to, from, bytes))) {
+		GT_2trace(WCD_debugMask, GT_7CLASS,
+			  "%s failed, to=0x%08x\n", __func__, to);
+		*err = DSP_EPOINTER;
+	}
+}
+#define cp_to_usr(to, from, err, n)				\
+	__cp_to_usr(to, from, &(err), (n) * sizeof(*(from)))
+
 /*
  *  ======== WCD_CallDevIOCtl ========
  *  Purpose: