aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sound/soc.h4
-rw-r--r--sound/soc/fsl/mpc8610_hpcd.c6
-rw-r--r--sound/soc/fsl/p1022_ds.c6
-rw-r--r--sound/soc/pxa/tosa.c4
-rw-r--r--sound/soc/pxa/zylonite.c4
-rw-r--r--sound/soc/soc-core.c8
6 files changed, 13 insertions, 19 deletions
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 4a489ae44a6e..2d10090a08c0 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -649,8 +649,8 @@ struct snd_soc_card {
649 649
650 bool instantiated; 650 bool instantiated;
651 651
652 int (*probe)(struct platform_device *pdev); 652 int (*probe)(struct snd_soc_card *card);
653 int (*remove)(struct platform_device *pdev); 653 int (*remove)(struct snd_soc_card *card);
654 654
655 /* the pre and post PM functions are used to do any PM work before and 655 /* the pre and post PM functions are used to do any PM work before and
656 * after the codec and DAI's do any PM work. */ 656 * after the codec and DAI's do any PM work. */
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
index 7d7847a1e66b..c16c6b2eff95 100644
--- a/sound/soc/fsl/mpc8610_hpcd.c
+++ b/sound/soc/fsl/mpc8610_hpcd.c
@@ -53,9 +53,8 @@ struct mpc8610_hpcd_data {
53 * 53 *
54 * Here we program the DMACR and PMUXCR registers. 54 * Here we program the DMACR and PMUXCR registers.
55 */ 55 */
56static int mpc8610_hpcd_machine_probe(struct platform_device *sound_device) 56static int mpc8610_hpcd_machine_probe(struct snd_soc_card *card)
57{ 57{
58 struct snd_soc_card *card = platform_get_drvdata(sound_device);
59 struct mpc8610_hpcd_data *machine_data = 58 struct mpc8610_hpcd_data *machine_data =
60 container_of(card, struct mpc8610_hpcd_data, card); 59 container_of(card, struct mpc8610_hpcd_data, card);
61 struct ccsr_guts_86xx __iomem *guts; 60 struct ccsr_guts_86xx __iomem *guts;
@@ -138,9 +137,8 @@ static int mpc8610_hpcd_startup(struct snd_pcm_substream *substream)
138 * This function is called to remove the sound device for one SSI. We 137 * This function is called to remove the sound device for one SSI. We
139 * de-program the DMACR and PMUXCR register. 138 * de-program the DMACR and PMUXCR register.
140 */ 139 */
141static int mpc8610_hpcd_machine_remove(struct platform_device *sound_device) 140static int mpc8610_hpcd_machine_remove(struct snd_soc_card *card)
142{ 141{
143 struct snd_soc_card *card = platform_get_drvdata(sound_device);
144 struct mpc8610_hpcd_data *machine_data = 142 struct mpc8610_hpcd_data *machine_data =
145 container_of(card, struct mpc8610_hpcd_data, card); 143 container_of(card, struct mpc8610_hpcd_data, card);
146 struct ccsr_guts_86xx __iomem *guts; 144 struct ccsr_guts_86xx __iomem *guts;
diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c
index 026b756961e0..66e0b68af147 100644
--- a/sound/soc/fsl/p1022_ds.c
+++ b/sound/soc/fsl/p1022_ds.c
@@ -85,9 +85,8 @@ struct machine_data {
85 * 85 *
86 * Here we program the DMACR and PMUXCR registers. 86 * Here we program the DMACR and PMUXCR registers.
87 */ 87 */
88static int p1022_ds_machine_probe(struct platform_device *sound_device) 88static int p1022_ds_machine_probe(struct snd_soc_card *card)
89{ 89{
90 struct snd_soc_card *card = platform_get_drvdata(sound_device);
91 struct machine_data *mdata = 90 struct machine_data *mdata =
92 container_of(card, struct machine_data, card); 91 container_of(card, struct machine_data, card);
93 struct ccsr_guts_85xx __iomem *guts; 92 struct ccsr_guts_85xx __iomem *guts;
@@ -160,9 +159,8 @@ static int p1022_ds_startup(struct snd_pcm_substream *substream)
160 * This function is called to remove the sound device for one SSI. We 159 * This function is called to remove the sound device for one SSI. We
161 * de-program the DMACR and PMUXCR register. 160 * de-program the DMACR and PMUXCR register.
162 */ 161 */
163static int p1022_ds_machine_remove(struct platform_device *sound_device) 162static int p1022_ds_machine_remove(struct snd_soc_card *card)
164{ 163{
165 struct snd_soc_card *card = platform_get_drvdata(sound_device);
166 struct machine_data *mdata = 164 struct machine_data *mdata =
167 container_of(card, struct machine_data, card); 165 container_of(card, struct machine_data, card);
168 struct ccsr_guts_85xx __iomem *guts; 166 struct ccsr_guts_85xx __iomem *guts;
diff --git a/sound/soc/pxa/tosa.c b/sound/soc/pxa/tosa.c
index f75804ef0897..489139a31cf9 100644
--- a/sound/soc/pxa/tosa.c
+++ b/sound/soc/pxa/tosa.c
@@ -237,7 +237,7 @@ static struct snd_soc_dai_link tosa_dai[] = {
237}, 237},
238}; 238};
239 239
240static int tosa_probe(struct platform_device *dev) 240static int tosa_probe(struct snd_soc_card *card)
241{ 241{
242 int ret; 242 int ret;
243 243
@@ -251,7 +251,7 @@ static int tosa_probe(struct platform_device *dev)
251 return ret; 251 return ret;
252} 252}
253 253
254static int tosa_remove(struct platform_device *dev) 254static int tosa_remove(struct snd_soc_card *card)
255{ 255{
256 gpio_free(TOSA_GPIO_L_MUTE); 256 gpio_free(TOSA_GPIO_L_MUTE);
257 return 0; 257 return 0;
diff --git a/sound/soc/pxa/zylonite.c b/sound/soc/pxa/zylonite.c
index 7b729013a728..c5858296b48a 100644
--- a/sound/soc/pxa/zylonite.c
+++ b/sound/soc/pxa/zylonite.c
@@ -189,7 +189,7 @@ static struct snd_soc_dai_link zylonite_dai[] = {
189}, 189},
190}; 190};
191 191
192static int zylonite_probe(struct platform_device *pdev) 192static int zylonite_probe(struct snd_soc_card *card)
193{ 193{
194 int ret; 194 int ret;
195 195
@@ -216,7 +216,7 @@ static int zylonite_probe(struct platform_device *pdev)
216 return 0; 216 return 0;
217} 217}
218 218
219static int zylonite_remove(struct platform_device *pdev) 219static int zylonite_remove(struct snd_soc_card *card)
220{ 220{
221 if (clk_pout) { 221 if (clk_pout) {
222 clk_disable(pout); 222 clk_disable(pout);
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 446838e7d3ec..4bc2365bf1dd 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1717,7 +1717,6 @@ static int snd_soc_init_codec_cache(struct snd_soc_codec *codec,
1717 1717
1718static void snd_soc_instantiate_card(struct snd_soc_card *card) 1718static void snd_soc_instantiate_card(struct snd_soc_card *card)
1719{ 1719{
1720 struct platform_device *pdev = to_platform_device(card->dev);
1721 struct snd_soc_codec *codec; 1720 struct snd_soc_codec *codec;
1722 struct snd_soc_codec_conf *codec_conf; 1721 struct snd_soc_codec_conf *codec_conf;
1723 enum snd_soc_compress_type compress_type; 1722 enum snd_soc_compress_type compress_type;
@@ -1781,7 +1780,7 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
1781 1780
1782 /* initialise the sound card only once */ 1781 /* initialise the sound card only once */
1783 if (card->probe) { 1782 if (card->probe) {
1784 ret = card->probe(pdev); 1783 ret = card->probe(card);
1785 if (ret < 0) 1784 if (ret < 0)
1786 goto card_probe_error; 1785 goto card_probe_error;
1787 } 1786 }
@@ -1842,7 +1841,7 @@ probe_dai_err:
1842 1841
1843card_probe_error: 1842card_probe_error:
1844 if (card->remove) 1843 if (card->remove)
1845 card->remove(pdev); 1844 card->remove(card);
1846 1845
1847 snd_card_free(card->snd_card); 1846 snd_card_free(card->snd_card);
1848 1847
@@ -1888,7 +1887,6 @@ static int soc_probe(struct platform_device *pdev)
1888 1887
1889static int soc_cleanup_card_resources(struct snd_soc_card *card) 1888static int soc_cleanup_card_resources(struct snd_soc_card *card)
1890{ 1889{
1891 struct platform_device *pdev = to_platform_device(card->dev);
1892 int i; 1890 int i;
1893 1891
1894 /* make sure any delayed work runs */ 1892 /* make sure any delayed work runs */
@@ -1909,7 +1907,7 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card)
1909 1907
1910 /* remove the card */ 1908 /* remove the card */
1911 if (card->remove) 1909 if (card->remove)
1912 card->remove(pdev); 1910 card->remove(card);
1913 1911
1914 kfree(card->rtd); 1912 kfree(card->rtd);
1915 snd_card_free(card->snd_card); 1913 snd_card_free(card->snd_card);