ASoC: samsung: Fix build on multiplatform
authorSachin Kamat <sachin.kamat@linaro.org>
Tue, 8 Apr 2014 11:41:04 +0000 (17:11 +0530)
committerMark Brown <broonie@linaro.org>
Tue, 8 Apr 2014 11:51:57 +0000 (12:51 +0100)
PCM and S/PDIF drivers referenced mach headers for a trivial
data structure. This caused build errors on multiplatform builds
as machine headers are not accessible from driver files. Move the data
structure definition to the driver header and remove the dependency.
While at it rename the structure to avoid multiple definition errors
as the same structure is also used by the platform code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/samsung/ac97.c
sound/soc/samsung/dma.h
sound/soc/samsung/i2s.c
sound/soc/samsung/pcm.c
sound/soc/samsung/s3c2412-i2s.c
sound/soc/samsung/s3c24xx-i2s.c
sound/soc/samsung/spdif.c

index 4a88e36c82ec1c827d7cd8658e0223991a3b621f..76b072bd4ba25eb9ba926d56cefc3702c45e5a17 100644 (file)
@@ -39,15 +39,15 @@ struct s3c_ac97_info {
 };
 static struct s3c_ac97_info s3c_ac97;
 
-static struct s3c2410_dma_client s3c_dma_client_out = {
+static struct s3c_dma_client s3c_dma_client_out = {
        .name = "AC97 PCMOut"
 };
 
-static struct s3c2410_dma_client s3c_dma_client_in = {
+static struct s3c_dma_client s3c_dma_client_in = {
        .name = "AC97 PCMIn"
 };
 
-static struct s3c2410_dma_client s3c_dma_client_micin = {
+static struct s3c_dma_client s3c_dma_client_micin = {
        .name = "AC97 MicIn"
 };
 
index 225e5378014eca4395d4481c77ddf2c1632b31a3..ad7c0f04f00d59529163e292146b3c6641d391d7 100644 (file)
 
 #include <sound/dmaengine_pcm.h>
 
+struct s3c_dma_client {
+       char *name;
+};
+
 struct s3c_dma_params {
-       struct s3c2410_dma_client *client;      /* stream identifier */
+       struct s3c_dma_client *client;  /* stream identifier */
        int channel;                            /* Channel ID */
        dma_addr_t dma_addr;
        int dma_size;                   /* Size of the DMA transfer */
index 0a9b44c940cee4c962942d23ecccd85466cc56b8..048ead96719984f85b2b1bc048e2c81b30cc9fb3 100644 (file)
@@ -1211,10 +1211,10 @@ static int samsung_i2s_probe(struct platform_device *pdev)
        pri_dai->dma_playback.dma_addr = regs_base + I2STXD;
        pri_dai->dma_capture.dma_addr = regs_base + I2SRXD;
        pri_dai->dma_playback.client =
-               (struct s3c2410_dma_client *)&pri_dai->dma_playback;
+               (struct s3c_dma_client *)&pri_dai->dma_playback;
        pri_dai->dma_playback.ch_name = "tx";
        pri_dai->dma_capture.client =
-               (struct s3c2410_dma_client *)&pri_dai->dma_capture;
+               (struct s3c_dma_client *)&pri_dai->dma_capture;
        pri_dai->dma_capture.ch_name = "rx";
        pri_dai->dma_playback.dma_size = 4;
        pri_dai->dma_capture.dma_size = 4;
@@ -1233,7 +1233,7 @@ static int samsung_i2s_probe(struct platform_device *pdev)
                }
                sec_dai->dma_playback.dma_addr = regs_base + I2STXDS;
                sec_dai->dma_playback.client =
-                       (struct s3c2410_dma_client *)&sec_dai->dma_playback;
+                       (struct s3c_dma_client *)&sec_dai->dma_playback;
                sec_dai->dma_playback.ch_name = "tx-sec";
 
                if (!np) {
index 6a5e4bf6ac96efaa1b3b3dba063390165eee724e..ab54e297957c105ee60e050a259323b453738fff 100644 (file)
@@ -20,7 +20,6 @@
 #include <sound/pcm_params.h>
 
 #include <linux/platform_data/asoc-s3c.h>
-#include <mach/dma.h>
 
 #include "dma.h"
 #include "pcm.h"
@@ -132,11 +131,11 @@ struct s3c_pcm_info {
        struct s3c_dma_params   *dma_capture;
 };
 
-static struct s3c2410_dma_client s3c_pcm_dma_client_out = {
+static struct s3c_dma_client s3c_pcm_dma_client_out = {
        .name           = "PCM Stereo out"
 };
 
-static struct s3c2410_dma_client s3c_pcm_dma_client_in = {
+static struct s3c_dma_client s3c_pcm_dma_client_in = {
        .name           = "PCM Stereo in"
 };
 
index d0794458963a6ad8de279eaae568a3bd95a32836..e9bb5d7a71ee5409ad6c92419d1f8010201a132b 100644 (file)
 #include "regs-i2s-v2.h"
 #include "s3c2412-i2s.h"
 
-static struct s3c2410_dma_client s3c2412_dma_client_out = {
+static struct s3c_dma_client s3c2412_dma_client_out = {
        .name           = "I2S PCM Stereo out"
 };
 
-static struct s3c2410_dma_client s3c2412_dma_client_in = {
+static struct s3c_dma_client s3c2412_dma_client_in = {
        .name           = "I2S PCM Stereo in"
 };
 
index f31e916dd8c4f78d394efc387f7f6f8ade83fdfd..d7b8457b565046692db8ad1e25b9376ae412d4b9 100644 (file)
 #include "dma.h"
 #include "s3c24xx-i2s.h"
 
-static struct s3c2410_dma_client s3c24xx_dma_client_out = {
+static struct s3c_dma_client s3c24xx_dma_client_out = {
        .name = "I2S PCM Stereo out"
 };
 
-static struct s3c2410_dma_client s3c24xx_dma_client_in = {
+static struct s3c_dma_client s3c24xx_dma_client_in = {
        .name = "I2S PCM Stereo in"
 };
 
index 28487dcc4538b939bd86a82395bb7299c2a5d243..cfe63b7bcc9f6b9a6779b9a88db93612b9e6a420 100644 (file)
@@ -18,7 +18,6 @@
 #include <sound/pcm_params.h>
 
 #include <linux/platform_data/asoc-s3c.h>
-#include <mach/dma.h>
 
 #include "dma.h"
 #include "spdif.h"
@@ -94,7 +93,7 @@ struct samsung_spdif_info {
        struct s3c_dma_params   *dma_playback;
 };
 
-static struct s3c2410_dma_client spdif_dma_client_out = {
+static struct s3c_dma_client spdif_dma_client_out = {
        .name           = "S/PDIF Stereo out",
 };