diff options
author | Frank Li <Frank.Li@freescale.com> | 2010-09-06 13:19:49 +0800 |
---|---|---|
committer | Frank Li <Frank.Li@freescale.com> | 2010-09-07 17:27:19 +0800 |
commit | 6b0334a50d5bee4a8713d5d1f50507e22d39f0d8 (patch) | |
tree | cd7f0a02411c02f9f14f78b54409386bae5e8249 /sound | |
parent | 454d48c92009092fcb1fb6c20b251675f20b5a0b (diff) |
ENGR00127171-5 Kernel Upgrade: Fix all drivers build error for mx23/mx28
Fix build error because kernel upgrade
Signed-off-by: Frank Li <Frank.Li@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/mxs-adc-codec.c | 19 | ||||
-rw-r--r-- | sound/soc/codecs/mxs_spdif.c | 20 | ||||
-rw-r--r-- | sound/soc/codecs/sgtl5000.c | 9 | ||||
-rw-r--r-- | sound/soc/mxs/mxs-adc.c | 4 | ||||
-rw-r--r-- | sound/soc/mxs/mxs-dai.c | 4 | ||||
-rw-r--r-- | sound/soc/mxs/mxs-pcm.c | 2 | ||||
-rw-r--r-- | sound/soc/mxs/mxs-spdif-dai.c | 2 |
7 files changed, 19 insertions, 41 deletions
diff --git a/sound/soc/codecs/mxs-adc-codec.c b/sound/soc/codecs/mxs-adc-codec.c index c5a223e8b170..34c06623e7c7 100644 --- a/sound/soc/codecs/mxs-adc-codec.c +++ b/sound/soc/codecs/mxs-adc-codec.c @@ -25,6 +25,7 @@ #include <linux/platform_device.h> #include <linux/dma-mapping.h> #include <linux/interrupt.h> +#include <linux/slab.h> #include <sound/core.h> #include <sound/pcm.h> @@ -913,7 +914,7 @@ static void mxs_codec_adc_disable(struct mxs_codec_priv *mxs_adc) static void mxs_codec_startup(struct snd_soc_codec *codec) { - struct mxs_codec_priv *mxs_adc = codec->private_data; + struct mxs_codec_priv *mxs_adc = snd_soc_codec_get_drvdata(codec); /* Soft reset DAC block */ __raw_writel(BM_AUDIOOUT_CTRL_SFTRST, @@ -943,7 +944,7 @@ static void mxs_codec_startup(struct snd_soc_codec *codec) static void mxs_codec_stop(struct snd_soc_codec *codec) { - struct mxs_codec_priv *mxs_adc = codec->private_data; + struct mxs_codec_priv *mxs_adc = snd_soc_codec_get_drvdata(codec); mxs_codec_dac_disable(mxs_adc); mxs_codec_adc_disable(mxs_adc); } @@ -997,14 +998,6 @@ static int mxs_codec_probe(struct platform_device *pdev) mxs_codec_startup(codec); - /* Register the socdev */ - ret = snd_soc_init_card(socdev); - if (ret < 0) { - dev_err(codec->dev, "failed to register card\n"); - snd_soc_dapm_free(socdev); - snd_soc_free_pcms(socdev); - return ret; - } /* Set default bias level*/ mxs_codec_set_bias_level(codec, SND_SOC_BIAS_STANDBY); return 0; @@ -1035,7 +1028,7 @@ static int mxs_codec_suspend(struct platform_device *pdev, if (codec == NULL) goto out; - mxs_adc = codec->private_data; + mxs_adc = snd_soc_codec_get_drvdata(codec); mxs_codec_dac_disable(mxs_adc); mxs_codec_adc_disable(mxs_adc); @@ -1056,7 +1049,7 @@ static int mxs_codec_resume(struct platform_device *pdev) if (codec == NULL) goto out; - mxs_adc = codec->private_data; + mxs_adc = snd_soc_codec_get_drvdata(codec); clk_enable(mxs_adc->clk); /* Soft reset DAC block */ @@ -1127,7 +1120,7 @@ static int __init mxs_codec_audio_probe(struct platform_device *pdev) codec->dev = &pdev->dev; codec->name = "mxs adc/dac"; codec->owner = THIS_MODULE; - codec->private_data = mxs_adc; + snd_soc_codec_set_drvdata(codec, mxs_adc); codec->read = mxs_codec_read; codec->write = mxs_codec_write; codec->bias_level = SND_SOC_BIAS_OFF; diff --git a/sound/soc/codecs/mxs_spdif.c b/sound/soc/codecs/mxs_spdif.c index 3a08912fbc00..cdd8c343da71 100644 --- a/sound/soc/codecs/mxs_spdif.c +++ b/sound/soc/codecs/mxs_spdif.c @@ -23,6 +23,7 @@ #include <linux/platform_device.h> #include <linux/dma-mapping.h> #include <linux/interrupt.h> +#include <linux/slab.h> #include <sound/core.h> #include <sound/pcm.h> @@ -209,7 +210,7 @@ static void mxs_codec_spdif_disable(struct mxs_codec_priv *mxs_spdif) static void mxs_codec_init(struct snd_soc_codec *codec) { - struct mxs_codec_priv *mxs_spdif = codec->private_data; + struct mxs_codec_priv *mxs_spdif = codec->drvdata; /* Soft reset SPDIF block */ __raw_writel(BM_SPDIF_CTRL_SFTRST, REGS_SPDIF_BASE + HW_SPDIF_CTRL_SET); @@ -226,7 +227,7 @@ static void mxs_codec_init(struct snd_soc_codec *codec) static void mxs_codec_exit(struct snd_soc_codec *codec) { - struct mxs_codec_priv *mxs_spdif = codec->private_data; + struct mxs_codec_priv *mxs_spdif = codec->drvdata; mxs_codec_spdif_disable(mxs_spdif); } @@ -268,15 +269,6 @@ static int mxs_codec_probe(struct platform_device *pdev) mxs_codec_init(codec); - /* Register the socdev */ - ret = snd_soc_init_card(socdev); - if (ret < 0) { - dev_err(codec->dev, "failed to register card\n"); - snd_soc_dapm_free(socdev); - snd_soc_free_pcms(socdev); - return ret; - } - return 0; } @@ -304,7 +296,7 @@ static int mxs_codec_suspend(struct platform_device *pdev, pm_message_t state) if (codec == NULL) goto out; - mxs_spdif = codec->private_data; + mxs_spdif = codec->drvdata; mxs_codec_spdif_disable(mxs_spdif); clk_disable(mxs_spdif->clk); @@ -324,7 +316,7 @@ static int mxs_codec_resume(struct platform_device *pdev) if (codec == NULL) goto out; - mxs_spdif = codec->private_data; + mxs_spdif = codec->drvdata; clk_enable(mxs_spdif->clk); /* Soft reset SPDIF block */ @@ -368,7 +360,7 @@ static int __init mxs_spdif_probe(struct platform_device *pdev) codec = &mxs_spdif->codec; codec->name = "mxs spdif"; codec->owner = THIS_MODULE; - codec->private_data = mxs_spdif; + codec->drvdata = mxs_spdif; codec->read = mxs_codec_read; codec->write = mxs_codec_write; codec->dai = &mxs_spdif_codec_dai; diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c index 49a6367b95e0..f05f76485054 100644 --- a/sound/soc/codecs/sgtl5000.c +++ b/sound/soc/codecs/sgtl5000.c @@ -18,6 +18,7 @@ #include <linux/clk.h> #include <linux/platform_device.h> #include <linux/regulator/consumer.h> +#include <linux/slab.h> #include <sound/core.h> #include <sound/pcm.h> #include <sound/pcm_params.h> @@ -1071,14 +1072,6 @@ static int sgtl5000_probe(struct platform_device *pdev) sgtl5000_set_bias_level(codec, SND_SOC_BIAS_STANDBY); - ret = snd_soc_init_card(socdev); - if (ret < 0) { - printk(KERN_ERR "sgtl5000: failed to register card\n"); - snd_soc_free_pcms(socdev); - snd_soc_dapm_free(socdev); - return ret; - } - return 0; } diff --git a/sound/soc/mxs/mxs-adc.c b/sound/soc/mxs/mxs-adc.c index 7069927b1ac3..cd5e93ce9d67 100644 --- a/sound/soc/mxs/mxs-adc.c +++ b/sound/soc/mxs/mxs-adc.c @@ -336,10 +336,10 @@ static int mxs_adc_startup(struct snd_pcm_substream *substream, if (playback) { irq = IRQ_DAC_ERROR; - cpu_dai->dma_data = &mxs_audio_out; + snd_soc_dai_set_dma_data(dai, substream, &mxs_audio_out); } else { irq = IRQ_ADC_ERROR; - cpu_dai->dma_data = &mxs_audio_in; + snd_soc_dai_set_dma_data(dai, substream, &mxs_audio_in); } ret = request_irq(irq, mxs_err_irq, 0, "MXS DAC/ADC Error", diff --git a/sound/soc/mxs/mxs-dai.c b/sound/soc/mxs/mxs-dai.c index a548b9948516..8df684d15164 100644 --- a/sound/soc/mxs/mxs-dai.c +++ b/sound/soc/mxs/mxs-dai.c @@ -388,9 +388,9 @@ static int mxs_saif_startup(struct snd_pcm_substream *substream, (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)) || \ ((saif_select->stream_mapping == PLAYBACK_SAIF1_CAPTURE_SAIF0) \ && (substream->stream == SNDRV_PCM_STREAM_CAPTURE))) - cpu_dai->dma_data = &mxs_saif_0; + snd_soc_dai_set_dma_data(cpu_dai, substream, &mxs_saif_0); else - cpu_dai->dma_data = &mxs_saif_1; + snd_soc_dai_set_dma_data(cpu_dai, substream, &mxs_saif_1); if (cpu_dai->playback.active && cpu_dai->capture.active) return 0; diff --git a/sound/soc/mxs/mxs-pcm.c b/sound/soc/mxs/mxs-pcm.c index f3cdcdbd2861..522905824ddb 100644 --- a/sound/soc/mxs/mxs-pcm.c +++ b/sound/soc/mxs/mxs-pcm.c @@ -286,7 +286,7 @@ static int mxs_pcm_dma_request(struct snd_pcm_substream *substream) struct snd_pcm_runtime *runtime = substream->runtime; struct snd_soc_pcm_runtime *rtd = substream->private_data; struct mxs_runtime_data *prtd = runtime->private_data; - struct mxs_pcm_dma_params *dma_data = rtd->dai->cpu_dai->dma_data; + struct mxs_pcm_dma_params *dma_data = snd_soc_dai_get_dma_data(rtd->dai, substream); int desc_num = mxs_pcm_hardware.periods_max; int desc; int ret; diff --git a/sound/soc/mxs/mxs-spdif-dai.c b/sound/soc/mxs/mxs-spdif-dai.c index 052c404c496d..1b45b595b90d 100644 --- a/sound/soc/mxs/mxs-spdif-dai.c +++ b/sound/soc/mxs/mxs-spdif-dai.c @@ -107,7 +107,7 @@ static int mxs_spdif_startup(struct snd_pcm_substream *substream, if (playback) { irq = IRQ_SPDIF_ERROR; - cpu_dai->dma_data = &mxs_spdif; + snd_soc_dai_set_dma_data(cpu_dai, substream, &mxs_spdif); } ret = request_irq(irq, mxs_err_irq, 0, "Mxs SPDIF Error", |