ASoC: Intel: bytcr_rt5651: Get platform data via dev_get_platdata()
[linux-2.6-microblaze.git] / sound / soc / intel / boards / bytcr_rt5651.c
index e94c912..2335cca 100644 (file)
@@ -713,7 +713,7 @@ static int byt_rt5651_codec_fixup(struct snd_soc_pcm_runtime *rtd,
        ret = snd_soc_dai_set_fmt(asoc_rtd_to_cpu(rtd, 0),
                                  SND_SOC_DAIFMT_I2S     |
                                  SND_SOC_DAIFMT_NB_NF   |
-                                 SND_SOC_DAIFMT_CBS_CFS
+                                 SND_SOC_DAIFMT_CBC_CFC
                                  );
 
        if (ret < 0) {
@@ -798,7 +798,7 @@ static struct snd_soc_dai_link byt_rt5651_dais[] = {
                .id = 0,
                .no_pcm = 1,
                .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
-                                               | SND_SOC_DAIFMT_CBS_CFS,
+                                               | SND_SOC_DAIFMT_CBC_CFC,
                .be_hw_params_fixup = byt_rt5651_codec_fixup,
                .dpcm_playback = 1,
                .dpcm_capture = 1,
@@ -894,9 +894,10 @@ struct acpi_chan_package {   /* ACPICA seems to require 64 bit integers */
 
 static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 {
+       struct device *dev = &pdev->dev;
        static const char * const mic_name[] = { "dmic", "in1", "in2", "in12" };
+       struct snd_soc_acpi_mach *mach = dev_get_platdata(dev);
        struct byt_rt5651_private *priv;
-       struct snd_soc_acpi_mach *mach;
        const char *platform_name;
        struct acpi_device *adev;
        struct device *codec_dev;
@@ -912,8 +913,6 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 
        /* register the soc card */
        byt_rt5651_card.dev = &pdev->dev;
-
-       mach = byt_rt5651_card.dev->platform_data;
        snd_soc_card_set_drvdata(&byt_rt5651_card, priv);
 
        /* fix index of codec dai */