From: Marcus Cooper <codekip...@gmail.com>

Signed-off-by: Marcus Cooper <codekip...@gmail.com>
---
 sound/soc/sunxi/spdif/sndspdif.c    |  3 ++-
 sound/soc/sunxi/spdif/sunxi_spdif.c | 10 ++++++----
 sound/soc/sunxi/spdif/sunxi_spdma.c |  6 +++---
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/sound/soc/sunxi/spdif/sndspdif.c b/sound/soc/sunxi/spdif/sndspdif.c
index 7bc5713..2730e02 100644
--- a/sound/soc/sunxi/spdif/sndspdif.c
+++ b/sound/soc/sunxi/spdif/sndspdif.c
@@ -20,8 +20,9 @@
 #include <sound/soc.h>
 #include <sound/soc-dapm.h>
 #include <sound/initval.h>
-#include <plat/sys_config.h>
+
 #include <linux/io.h>
+#include <plat/sys_config.h>
 
 #define SNDSPDIF_RATES (SNDRV_PCM_RATE_8000_192000 | SNDRV_PCM_RATE_KNOT)
 #define SNDSPDIF_FORMATS (SNDRV_PCM_FMTBIT_S16_LE)
diff --git a/sound/soc/sunxi/spdif/sunxi_spdif.c 
b/sound/soc/sunxi/spdif/sunxi_spdif.c
index df53666..a9f36d2 100644
--- a/sound/soc/sunxi/spdif/sunxi_spdif.c
+++ b/sound/soc/sunxi/spdif/sunxi_spdif.c
@@ -37,6 +37,12 @@
 #include "sunxi_spdif.h"
 
 static int regsave[6];
+struct sunxi_spdif_info sunxi_spdif;
+static u32 spdif_handle;
+static struct clk *spdif_apbclk;
+static struct clk *spdif_pll2clk;
+static struct clk *spdif_pllx8;
+static struct clk *spdif_moduleclk;
 
 static struct sunxi_dma_params sunxi_spdif_stereo_out = {
        .client.name    =       "SPDIF out",
@@ -54,10 +60,6 @@ static struct sunxi_dma_params sunxi_spdif_stereo_in = {
        .dma_addr       =       SUNXI_SPDIFBASE + SUNXI_SPDIF_RXFIFO,
 };
 
-struct sunxi_spdif_info sunxi_spdif;
-static u32 spdif_handle;
-static struct clk *spdif_apbclk, *spdif_pll2clk, *spdif_pllx8, 
*spdif_moduleclk;
-
 void sunxi_snd_txctrl(struct snd_pcm_substream *substream, int on)
 {
        u32 reg_val;
diff --git a/sound/soc/sunxi/spdif/sunxi_spdma.c 
b/sound/soc/sunxi/spdif/sunxi_spdma.c
index 5db8f62..f5cc44c 100644
--- a/sound/soc/sunxi/spdif/sunxi_spdma.c
+++ b/sound/soc/sunxi/spdif/sunxi_spdma.c
@@ -33,9 +33,6 @@
 
 #include "sunxi_spdif.h"
 
-static volatile unsigned int dmasrc;
-static volatile unsigned int dmadst;
-
 static const struct snd_pcm_hardware sunxi_pcm_hardware = {
        .info                   = SNDRV_PCM_INFO_INTERLEAVED |
                                        SNDRV_PCM_INFO_BLOCK_TRANSFER |
@@ -267,6 +264,9 @@ static int sunxi_pcm_trigger(struct snd_pcm_substream 
*substream, int cmd)
 
 static snd_pcm_uframes_t sunxi_pcm_pointer(struct snd_pcm_substream *substream)
 {
+       static volatile unsigned int dmasrc;
+       static volatile unsigned int dmadst;
+
        struct snd_pcm_runtime *runtime = substream->runtime;
        struct sunxi_runtime_data *prtd = runtime->private_data;
        unsigned long res = 0;
-- 
1.9.1

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to