diff options
| author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2015-01-06 06:14:32 -0500 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2015-03-02 11:19:26 -0500 |
| commit | d7a6fe015b2abe33565538a3faf757e095e094e7 (patch) | |
| tree | e4cf8ce14362b62f4f18e1de9aa0678c55a9bc1d | |
| parent | c517d838eb7d07bbe9507871fab3931deccff539 (diff) | |
ASoC: sam9g20_wm8731: drop machine_is_xxx
Atmel based boards can now only be used with device tree. Drop non DT
initialization.
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | sound/soc/atmel/sam9g20_wm8731.c | 68 |
1 files changed, 31 insertions, 37 deletions
diff --git a/sound/soc/atmel/sam9g20_wm8731.c b/sound/soc/atmel/sam9g20_wm8731.c index f5ad214663f9..8de836165cf2 100644 --- a/sound/soc/atmel/sam9g20_wm8731.c +++ b/sound/soc/atmel/sam9g20_wm8731.c | |||
| @@ -46,8 +46,6 @@ | |||
| 46 | #include <sound/pcm_params.h> | 46 | #include <sound/pcm_params.h> |
| 47 | #include <sound/soc.h> | 47 | #include <sound/soc.h> |
| 48 | 48 | ||
| 49 | #include <asm/mach-types.h> | ||
| 50 | |||
| 51 | #include "../codecs/wm8731.h" | 49 | #include "../codecs/wm8731.h" |
| 52 | #include "atmel-pcm.h" | 50 | #include "atmel-pcm.h" |
| 53 | #include "atmel_ssc_dai.h" | 51 | #include "atmel_ssc_dai.h" |
| @@ -171,9 +169,7 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev) | |||
| 171 | int ret; | 169 | int ret; |
| 172 | 170 | ||
| 173 | if (!np) { | 171 | if (!np) { |
| 174 | if (!(machine_is_at91sam9g20ek() || | 172 | return -ENODEV; |
| 175 | machine_is_at91sam9g20ek_2mmc())) | ||
| 176 | return -ENODEV; | ||
| 177 | } | 173 | } |
| 178 | 174 | ||
| 179 | ret = atmel_ssc_set_audio(0); | 175 | ret = atmel_ssc_set_audio(0); |
| @@ -210,39 +206,37 @@ static int at91sam9g20ek_audio_probe(struct platform_device *pdev) | |||
| 210 | card->dev = &pdev->dev; | 206 | card->dev = &pdev->dev; |
| 211 | 207 | ||
| 212 | /* Parse device node info */ | 208 | /* Parse device node info */ |
| 213 | if (np) { | 209 | ret = snd_soc_of_parse_card_name(card, "atmel,model"); |
| 214 | ret = snd_soc_of_parse_card_name(card, "atmel,model"); | 210 | if (ret) |
| 215 | if (ret) | 211 | goto err; |
| 216 | goto err; | 212 | |
| 217 | 213 | ret = snd_soc_of_parse_audio_routing(card, | |
| 218 | ret = snd_soc_of_parse_audio_routing(card, | 214 | "atmel,audio-routing"); |
| 219 | "atmel,audio-routing"); | 215 | if (ret) |
| 220 | if (ret) | 216 | goto err; |
| 221 | goto err; | 217 | |
| 222 | 218 | /* Parse codec info */ | |
| 223 | /* Parse codec info */ | 219 | at91sam9g20ek_dai.codec_name = NULL; |
| 224 | at91sam9g20ek_dai.codec_name = NULL; | 220 | codec_np = of_parse_phandle(np, "atmel,audio-codec", 0); |
| 225 | codec_np = of_parse_phandle(np, "atmel,audio-codec", 0); | 221 | if (!codec_np) { |
| 226 | if (!codec_np) { | 222 | dev_err(&pdev->dev, "codec info missing\n"); |
| 227 | dev_err(&pdev->dev, "codec info missing\n"); | 223 | return -EINVAL; |
| 228 | return -EINVAL; | 224 | } |
| 229 | } | 225 | at91sam9g20ek_dai.codec_of_node = codec_np; |
| 230 | at91sam9g20ek_dai.codec_of_node = codec_np; | 226 | |
| 231 | 227 | /* Parse dai and platform info */ | |
| 232 | /* Parse dai and platform info */ | 228 | at91sam9g20ek_dai.cpu_dai_name = NULL; |
| 233 | at91sam9g20ek_dai.cpu_dai_name = NULL; | 229 | at91sam9g20ek_dai.platform_name = NULL; |
| 234 | at91sam9g20ek_dai.platform_name = NULL; | 230 | cpu_np = of_parse_phandle(np, "atmel,ssc-controller", 0); |
| 235 | cpu_np = of_parse_phandle(np, "atmel,ssc-controller", 0); | 231 | if (!cpu_np) { |
| 236 | if (!cpu_np) { | 232 | dev_err(&pdev->dev, "dai and pcm info missing\n"); |
| 237 | dev_err(&pdev->dev, "dai and pcm info missing\n"); | 233 | return -EINVAL; |
| 238 | return -EINVAL; | ||
| 239 | } | ||
| 240 | at91sam9g20ek_dai.cpu_of_node = cpu_np; | ||
| 241 | at91sam9g20ek_dai.platform_of_node = cpu_np; | ||
| 242 | |||
| 243 | of_node_put(codec_np); | ||
| 244 | of_node_put(cpu_np); | ||
| 245 | } | 234 | } |
| 235 | at91sam9g20ek_dai.cpu_of_node = cpu_np; | ||
| 236 | at91sam9g20ek_dai.platform_of_node = cpu_np; | ||
| 237 | |||
| 238 | of_node_put(codec_np); | ||
| 239 | of_node_put(cpu_np); | ||
| 246 | 240 | ||
| 247 | ret = snd_soc_register_card(card); | 241 | ret = snd_soc_register_card(card); |
| 248 | if (ret) { | 242 | if (ret) { |
