소스 검색

ASoC: fix registration of the SoC card in the Freescale MPC8610 drivers

The Freescale MPC8610 driver was defining two SOC card (snd_soc_card)
structures, partially initializing each one, but registering only one of
them with ASoC.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Timur Tabi 16 년 전
부모
커밋
8a9dee59a3
1개의 변경된 파일6개의 추가작업 그리고 12개의 파일을 삭제
  1. 6 12
      sound/soc/fsl/mpc8610_hpcd.c

+ 6 - 12
sound/soc/fsl/mpc8610_hpcd.c

@@ -182,16 +182,6 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {
 	.startup = mpc8610_hpcd_startup,
 	.startup = mpc8610_hpcd_startup,
 };
 };
 
 
-/**
- * mpc8610_hpcd_machine: ASoC machine data
- */
-static struct snd_soc_card mpc8610_hpcd_machine = {
-	.probe = mpc8610_hpcd_machine_probe,
-	.remove = mpc8610_hpcd_machine_remove,
-	.name = "MPC8610 HPCD",
-	.num_links = 1,
-};
-
 /**
 /**
  * mpc8610_hpcd_probe: OF probe function for the fabric driver
  * mpc8610_hpcd_probe: OF probe function for the fabric driver
  *
  *
@@ -455,7 +445,11 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
 	machine_data->dai.codec_dai = &cs4270_dai; /* The codec_dai we want */
 	machine_data->dai.codec_dai = &cs4270_dai; /* The codec_dai we want */
 	machine_data->dai.ops = &mpc8610_hpcd_ops;
 	machine_data->dai.ops = &mpc8610_hpcd_ops;
 
 
-	mpc8610_hpcd_machine.dai_link = &machine_data->dai;
+	machine_data->machine.probe = mpc8610_hpcd_machine_probe;
+	machine_data->machine.remove = mpc8610_hpcd_machine_remove;
+	machine_data->machine.name = "MPC8610 HPCD";
+	machine_data->machine.num_links = 1;
+	machine_data->machine.dai_link = &machine_data->dai;
 
 
 	/* Allocate a new audio platform device structure */
 	/* Allocate a new audio platform device structure */
 	sound_device = platform_device_alloc("soc-audio", -1);
 	sound_device = platform_device_alloc("soc-audio", -1);
@@ -465,7 +459,7 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
 		goto error;
 		goto error;
 	}
 	}
 
 
-	machine_data->sound_devdata.card = &mpc8610_hpcd_machine;
+	machine_data->sound_devdata.card = &machine_data->machine;
 	machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270;
 	machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270;
 	machine_data->machine.platform = &fsl_soc_platform;
 	machine_data->machine.platform = &fsl_soc_platform;