ASoC: Push platform registration down into the card
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 2 Dec 2008 16:01:14 +0000 (16:01 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 2 Dec 2008 16:03:40 +0000 (16:03 +0000)
As part of the deprecation of snd_soc_device push the registration of
the platform down into the card structure.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
31 files changed:
include/sound/soc.h
sound/soc/atmel/playpaq_wm8510.c
sound/soc/atmel/sam9g20_wm8731.c
sound/soc/blackfin/bf5xx-ad1980.c
sound/soc/blackfin/bf5xx-ad73311.c
sound/soc/blackfin/bf5xx-ssm2602.c
sound/soc/davinci/davinci-evm.c
sound/soc/davinci/davinci-i2s.c
sound/soc/davinci/davinci-sffsdr.c
sound/soc/fsl/mpc8610_hpcd.c
sound/soc/fsl/soc-of-simple.c
sound/soc/omap/n810.c
sound/soc/omap/omap2evm.c
sound/soc/omap/omap3beagle.c
sound/soc/omap/osk5912.c
sound/soc/omap/overo.c
sound/soc/omap/sdp3430.c
sound/soc/pxa/corgi.c
sound/soc/pxa/e800_wm9712.c
sound/soc/pxa/em-x270.c
sound/soc/pxa/palm27x.c
sound/soc/pxa/poodle.c
sound/soc/pxa/spitz.c
sound/soc/pxa/tosa.c
sound/soc/pxa/zylonite.c
sound/soc/s3c24xx/ln2440sbc_alc650.c
sound/soc/s3c24xx/neo1973_wm8753.c
sound/soc/s3c24xx/s3c24xx_uda134x.c
sound/soc/s3c24xx/smdk2443_wm9710.c
sound/soc/sh/sh7760-ac97.c
sound/soc/soc-core.c

index 359ec49f8d0daa3d2156bab1efcbd3069a4e65df..ad8141acd6b05df5bc8d40c6845e3b365cdedc88 100644 (file)
@@ -352,6 +352,7 @@ struct snd_soc_card {
 
        struct snd_soc_device *socdev;
 
+       struct snd_soc_platform *platform;
        struct delayed_work delayed_work;
        struct work_struct deferred_resume_work;
 };
@@ -360,7 +361,6 @@ struct snd_soc_card {
 struct snd_soc_device {
        struct device *dev;
        struct snd_soc_card *card;
-       struct snd_soc_platform *platform;
        struct snd_soc_codec *codec;
        struct snd_soc_codec_device *codec_dev;
        void *codec_data;
index d40b5a52a8d28169dc9375985894696913bada6b..43dd8cee83c64e2d87bd2574fbcb31c7cafabf9c 100644 (file)
@@ -363,6 +363,7 @@ static struct snd_soc_dai_link playpaq_wm8510_dai = {
 
 static struct snd_soc_card snd_soc_playpaq = {
        .name = "LRS_PlayPaq_WM8510",
+       .platform = &at32_soc_platform,
        .dai_link = &playpaq_wm8510_dai,
        .num_links = 1,
 };
@@ -378,7 +379,6 @@ static struct wm8510_setup_data playpaq_wm8510_setup = {
 
 static struct snd_soc_device playpaq_wm8510_snd_devdata = {
        .card = &snd_soc_playpaq,
-       .platform = &at32_soc_platform,
        .codec_dev = &soc_codec_dev_wm8510,
        .codec_data = &playpaq_wm8510_setup,
 };
index fdc1d0206e0b5406fb784f12d3c2c41b87c64915..1fb59a9d3719471fb82c530abef85ce37875c4b6 100644 (file)
@@ -244,6 +244,7 @@ static struct snd_soc_dai_link at91sam9g20ek_dai = {
 
 static struct snd_soc_card snd_soc_at91sam9g20ek = {
        .name = "WM8731",
+       .platform = &atmel_soc_platform,
        .dai_link = &at91sam9g20ek_dai,
        .num_links = 1,
 };
@@ -255,7 +256,6 @@ static struct wm8731_setup_data at91sam9g20ek_wm8731_setup = {
 
 static struct snd_soc_device at91sam9g20ek_snd_devdata = {
        .card = &snd_soc_at91sam9g20ek,
-       .platform = &atmel_soc_platform,
        .codec_dev = &soc_codec_dev_wm8731,
        .codec_data = &at91sam9g20ek_wm8731_setup,
 };
index 36c569a43ce18b37765f65ce4ee3e16a8f524910..d8f5912737788d871c1fd6478d45cc64a4c7ee79 100644 (file)
@@ -69,13 +69,13 @@ static struct snd_soc_dai_link bf5xx_board_dai = {
 
 static struct snd_soc_card bf5xx_board = {
        .name = "bf5xx-board",
+       .platform = &bf5xx_ac97_soc_platform,
        .dai_link = &bf5xx_board_dai,
        .num_links = 1,
 };
 
 static struct snd_soc_device bf5xx_board_snd_devdata = {
        .card = &bf5xx_board,
-       .platform = &bf5xx_ac97_soc_platform,
        .codec_dev = &soc_codec_dev_ad1980,
 };
 
index 57da14799375d93a82a90dc373c448a934356299..7f2a5e199075421ef0ebee1097139a2671f2f6d2 100644 (file)
@@ -192,6 +192,7 @@ static struct snd_soc_dai_link bf5xx_ad73311_dai = {
 
 static struct snd_soc_card bf5xx_ad73311 = {
        .name = "bf5xx_ad73311",
+       .platform = &bf5xx_i2s_soc_platform,
        .probe = bf5xx_probe,
        .dai_link = &bf5xx_ad73311_dai,
        .num_links = 1,
@@ -199,7 +200,6 @@ static struct snd_soc_card bf5xx_ad73311 = {
 
 static struct snd_soc_device bf5xx_ad73311_snd_devdata = {
        .card = &bf5xx_ad73311,
-       .platform = &bf5xx_i2s_soc_platform,
        .codec_dev = &soc_codec_dev_ad73311,
 };
 
index 0078dfcd95b92e09053f598f12d8034becdfc179..bc0cdded711664ccd0437e82fb62e41807a6a790 100644 (file)
@@ -137,13 +137,13 @@ static struct ssm2602_setup_data bf5xx_ssm2602_setup = {
 
 static struct snd_soc_card bf5xx_ssm2602 = {
        .name = "bf5xx_ssm2602",
+       .platform = &bf5xx_i2s_soc_platform,
        .dai_link = &bf5xx_ssm2602_dai,
        .num_links = 1,
 };
 
 static struct snd_soc_device bf5xx_ssm2602_snd_devdata = {
        .card = &bf5xx_ssm2602,
-       .platform = &bf5xx_i2s_soc_platform,
        .codec_dev = &soc_codec_dev_ssm2602,
        .codec_data = &bf5xx_ssm2602_setup,
 };
index 2ce34d44b15c82229cb5ae38e4ed3754135a0562..d87b91179cc882f5369169d47f2c2b88d1cd98b8 100644 (file)
@@ -130,6 +130,7 @@ static struct snd_soc_dai_link evm_dai = {
 /* davinci-evm audio machine driver */
 static struct snd_soc_card snd_soc_card_evm = {
        .name = "DaVinci EVM",
+       .platform = &davinci_soc_platform,
        .dai_link = &evm_dai,
        .num_links = 1,
 };
@@ -143,7 +144,6 @@ static struct aic3x_setup_data evm_aic3x_setup = {
 /* evm audio subsystem */
 static struct snd_soc_device evm_snd_devdata = {
        .card = &snd_soc_card_evm,
-       .platform = &davinci_soc_platform,
        .codec_dev = &soc_codec_dev_aic3x,
        .codec_data = &evm_aic3x_setup,
 };
index cf31b3bb96cf500f859778e2127b737e0ba76910..8b99efbc64c61921f8b8302edecb7ca66e18da84 100644 (file)
@@ -112,7 +112,7 @@ static void davinci_mcbsp_start(struct snd_pcm_substream *substream)
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct davinci_mcbsp_dev *dev = rtd->dai->cpu_dai->private_data;
        struct snd_soc_device *socdev = rtd->socdev;
-       struct snd_soc_platform *platform = socdev->platform;
+       struct snd_soc_platform *platform = socdev->card->platform;
        u32 w;
        int ret;
 
index e95fde1766b5f5f34b700c000ca10f950f648fe4..f67579d527655ad3fd84eb9a4e8f0c1bd23b5527 100644 (file)
@@ -76,6 +76,7 @@ static struct snd_soc_dai_link sffsdr_dai = {
 /* davinci-sffsdr audio machine driver */
 static struct snd_soc_card snd_soc_sffsdr = {
        .name = "DaVinci SFFSDR",
+       .platform = &davinci_soc_platform,
        .dai_link = &sffsdr_dai,
        .num_links = 1,
 };
@@ -91,7 +92,6 @@ static struct pcm3008_setup_data sffsdr_pcm3008_setup = {
 /* sffsdr audio subsystem */
 static struct snd_soc_device sffsdr_snd_devdata = {
        .card = &snd_soc_sffsdr,
-       .platform = &davinci_soc_platform,
        .codec_dev = &soc_codec_dev_pcm3008,
        .codec_data = &sffsdr_pcm3008_setup,
 };
index 1cf4d6eeb5384e7f659fca54d87aee20ac55f7eb..bcec3f60bad99d8e5e885ebe9646ed942ebd1ec4 100644 (file)
@@ -467,7 +467,7 @@ static int mpc8610_hpcd_probe(struct of_device *ofdev,
 
        machine_data->sound_devdata.card = &mpc8610_hpcd_machine;
        machine_data->sound_devdata.codec_dev = &soc_codec_device_cs4270;
-       machine_data->sound_devdata.platform = &fsl_soc_platform;
+       machine_data->machine.platform = &fsl_soc_platform;
 
        sound_device->dev.platform_data = machine_data;
 
index 53be6491320a944beed760873b766c5fb71f294e..8bc5cd9e972fc89a2223dc32f01c42cbffd15fea 100644 (file)
@@ -158,7 +158,7 @@ int of_snd_soc_register_platform(struct snd_soc_platform *platform,
 
        of_soc->platform_node = node;
        of_soc->dai_link.cpu_dai = cpu_dai;
-       of_soc->device.platform = platform;
+       of_soc->card.platform = platform;
        of_soc->card.name = of_soc->dai_link.cpu_dai->name;
 
        /* Now try to register the SoC device */
index 18e2062e3a11815c9112221a040ba288eef26850..25593fee9121e22df808bd88ac5f2048ea2f2fae 100644 (file)
@@ -288,6 +288,7 @@ static struct snd_soc_dai_link n810_dai = {
 /* Audio machine driver */
 static struct snd_soc_card snd_soc_n810 = {
        .name = "N810",
+       .platform = &omap_soc_platform,
        .dai_link = &n810_dai,
        .num_links = 1,
 };
@@ -303,7 +304,6 @@ static struct aic3x_setup_data n810_aic33_setup = {
 /* Audio subsystem */
 static struct snd_soc_device n810_snd_devdata = {
        .card = &snd_soc_n810,
-       .platform = &omap_soc_platform,
        .codec_dev = &soc_codec_dev_aic3x,
        .codec_data = &n810_aic33_setup,
 };
index 7b160f9d83f9cf68f2876d1010d86b7f03ee4702..0c2322dcf02a489c82653a257dcd8fe80aa4e33b 100644 (file)
@@ -93,6 +93,7 @@ static struct snd_soc_dai_link omap2evm_dai = {
 /* Audio machine driver */
 static struct snd_soc_card snd_soc_omap2evm = {
        .name = "omap2evm",
+       .platform = &omap_soc_platform,
        .dai_link = &omap2evm_dai,
        .num_links = 1,
 };
@@ -100,7 +101,6 @@ static struct snd_soc_card snd_soc_omap2evm = {
 /* Audio subsystem */
 static struct snd_soc_device omap2evm_snd_devdata = {
        .card = &snd_soc_omap2evm,
-       .platform = &omap_soc_platform,
        .codec_dev = &soc_codec_dev_twl4030,
 };
 
index 3ed25464627f01acd49c70b12005e585269d3f0b..fd24a4acd2f5d622888b5f7dd8481a17361ac4b9 100644 (file)
@@ -90,6 +90,7 @@ static struct snd_soc_dai_link omap3beagle_dai = {
 /* Audio machine driver */
 static struct snd_soc_card snd_soc_omap3beagle = {
        .name = "omap3beagle",
+       .platform = &omap_soc_platform,
        .dai_link = &omap3beagle_dai,
        .num_links = 1,
 };
@@ -97,7 +98,6 @@ static struct snd_soc_card snd_soc_omap3beagle = {
 /* Audio subsystem */
 static struct snd_soc_device omap3beagle_snd_devdata = {
        .card = &snd_soc_omap3beagle,
-       .platform = &omap_soc_platform,
        .codec_dev = &soc_codec_dev_twl4030,
 };
 
index 7a8f14d0c772201f905f1214fc0db35a24b9b3af..845bf41335b93db0fe31e95c3ff3fa4d67aaad73 100644 (file)
@@ -145,6 +145,7 @@ static struct snd_soc_dai_link osk_dai = {
 /* Audio machine driver */
 static struct snd_soc_card snd_soc_card_osk = {
        .name = "OSK5912",
+       .platform = &omap_soc_platform,
        .dai_link = &osk_dai,
        .num_links = 1,
 };
@@ -152,7 +153,6 @@ static struct snd_soc_card snd_soc_card_osk = {
 /* Audio subsystem */
 static struct snd_soc_device osk_snd_devdata = {
        .card = &snd_soc_card_osk,
-       .platform = &omap_soc_platform,
        .codec_dev = &soc_codec_dev_tlv320aic23,
 };
 
index eea0c372bb3f950f9fb2b2efacb067a3fac6e5ac..a72dc4e159e5f813ff1369c93a788671ba5747c2 100644 (file)
@@ -90,6 +90,7 @@ static struct snd_soc_dai_link overo_dai = {
 /* Audio machine driver */
 static struct snd_soc_card snd_soc_card_overo = {
        .name = "overo",
+       .platform = &omap_soc_platform,
        .dai_link = &overo_dai,
        .num_links = 1,
 };
@@ -97,7 +98,6 @@ static struct snd_soc_card snd_soc_card_overo = {
 /* Audio subsystem */
 static struct snd_soc_device overo_snd_devdata = {
        .card = &snd_soc_card_overo,
-       .platform = &omap_soc_platform,
        .codec_dev = &soc_codec_dev_twl4030,
 };
 
index 85fd160bca172677931fef27016ff3b898d1f2a6..ad97836818b1a45406d2de42907e7b38f606b918 100644 (file)
@@ -93,6 +93,7 @@ static struct snd_soc_dai_link sdp3430_dai = {
 /* Audio machine driver */
 static struct snd_soc_machine snd_soc_machine_sdp3430 = {
        .name = "SDP3430",
+       .platform = &omap_soc_platform,
        .dai_link = &sdp3430_dai,
        .num_links = 1,
 };
@@ -100,7 +101,6 @@ static struct snd_soc_machine snd_soc_machine_sdp3430 = {
 /* Audio subsystem */
 static struct snd_soc_device sdp3430_snd_devdata = {
        .machine = &snd_soc_machine_sdp3430,
-       .platform = &omap_soc_platform,
        .codec_dev = &soc_codec_dev_twl4030,
 };
 
index e56bf4b6c2afe36d31bff35eacf13d438012055e..1ba25a559524296217824f188ac8f4de081a72ec 100644 (file)
@@ -312,6 +312,7 @@ static struct snd_soc_dai_link corgi_dai = {
 /* corgi audio machine driver */
 static struct snd_soc_card snd_soc_corgi = {
        .name = "Corgi",
+       .platform = &pxa2xx_soc_platform,
        .dai_link = &corgi_dai,
        .num_links = 1,
 };
@@ -325,7 +326,6 @@ static struct wm8731_setup_data corgi_wm8731_setup = {
 /* corgi audio subsystem */
 static struct snd_soc_device corgi_snd_devdata = {
        .card = &snd_soc_corgi,
-       .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm8731,
        .codec_data = &corgi_wm8731_setup,
 };
index 60c64861512a813f481f62f38d990d6dc70d2d7d..2e3386dfa0f0ed0604568b0b98d4a4b0f19105f8 100644 (file)
@@ -42,13 +42,13 @@ static struct snd_soc_dai_link e800_dai[] = {
 
 static struct snd_soc_card e800 = {
        .name = "Toshiba e800",
+       .platform = &pxa2xx_soc_platform,
        .dai_link = e800_dai,
        .num_links = ARRAY_SIZE(e800_dai),
 };
 
 static struct snd_soc_device e800_snd_devdata = {
        .card = &e800,
-       .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm9712,
 };
 
index d6884b755d552eaf0fd5a5bb79b3c844609ca1e7..fe4a729ea6487653881c2bda3b4c627ff58b2110 100644 (file)
@@ -54,13 +54,13 @@ static struct snd_soc_dai_link em_x270_dai[] = {
 
 static struct snd_soc_card em_x270 = {
        .name = "EM-X270",
+       .platform = &pxa2xx_soc_platform,
        .dai_link = em_x270_dai,
        .num_links = ARRAY_SIZE(em_x270_dai),
 };
 
 static struct snd_soc_device em_x270_snd_devdata = {
        .card = &em_x270,
-       .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm9712,
 };
 
index 3bb8879ac8a2f1f2477e666659b4816ad7af8fc9..4a9cf3083af0b01c554147e9c5aa7e5071562787 100644 (file)
@@ -191,13 +191,13 @@ static struct snd_soc_dai_link palm27x_dai[] = {
 
 static struct snd_soc_card palm27x_asoc = {
        .name = "Palm/PXA27x",
+       .platform = &pxa2xx_soc_platform,
        .dai_link = palm27x_dai,
        .num_links = ARRAY_SIZE(palm27x_dai),
 };
 
 static struct snd_soc_device palm27x_snd_devdata = {
        .card = &palm27x_asoc,
-       .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm9712,
 };
 
index 03b510ab282446ba672d24da909ffbc83d5c8435..6e9827189fffdca01b79b9c38bb212ee4998ce17 100644 (file)
@@ -278,6 +278,7 @@ static struct snd_soc_dai_link poodle_dai = {
 /* poodle audio machine driver */
 static struct snd_soc_card snd_soc_poodle = {
        .name = "Poodle",
+       .platform = &pxa2xx_soc_platform,
        .dai_link = &poodle_dai,
        .num_links = 1,
 };
@@ -291,7 +292,6 @@ static struct wm8731_setup_data poodle_wm8731_setup = {
 /* poodle audio subsystem */
 static struct snd_soc_device poodle_snd_devdata = {
        .card = &snd_soc_poodle,
-       .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm8731,
        .codec_data = &poodle_wm8731_setup,
 };
index 579d93368f14892e37ac1277856ef976339226ce..a3b9e6bdf9794cb1350d34448efeddbee1989591 100644 (file)
@@ -321,6 +321,7 @@ static struct snd_soc_dai_link spitz_dai = {
 /* spitz audio machine driver */
 static struct snd_soc_card snd_soc_spitz = {
        .name = "Spitz",
+       .platform = &pxa2xx_soc_platform,
        .dai_link = &spitz_dai,
        .num_links = 1,
 };
@@ -334,7 +335,6 @@ static struct wm8750_setup_data spitz_wm8750_setup = {
 /* spitz audio subsystem */
 static struct snd_soc_device spitz_snd_devdata = {
        .card = &snd_soc_spitz,
-       .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm8750,
        .codec_data = &spitz_wm8750_setup,
 };
index 48242b32a28b4d40337c5dff15a9332814a9dae7..c77194f74c9b56eea9438db006c0d4b37b7912b5 100644 (file)
@@ -252,6 +252,7 @@ static int tosa_remove(struct platform_device *dev)
 
 static struct snd_soc_card tosa = {
        .name = "Tosa",
+       .platform = &pxa2xx_soc_platform,
        .dai_link = tosa_dai,
        .num_links = ARRAY_SIZE(tosa_dai),
        .probe = tosa_probe,
@@ -260,7 +261,6 @@ static struct snd_soc_card tosa = {
 
 static struct snd_soc_device tosa_snd_devdata = {
        .card = &tosa,
-       .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm9712,
 };
 
index 842d6500d61f1fe40c66399c4f7f9987b349ea58..f8e9ecd589d3cf5d163573b2fb4eaee3a8dc397f 100644 (file)
@@ -175,13 +175,13 @@ static struct snd_soc_dai_link zylonite_dai[] = {
 
 static struct snd_soc_card zylonite = {
        .name = "Zylonite",
+       .platform = &pxa2xx_soc_platform,
        .dai_link = zylonite_dai,
        .num_links = ARRAY_SIZE(zylonite_dai),
 };
 
 static struct snd_soc_device zylonite_snd_ac97_devdata = {
        .card = &zylonite,
-       .platform = &pxa2xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm9713,
 };
 
index a70cbc0fa070d716ffe6695c119974ad488705d9..12c71482d258b35c70d22ecf9e9c18441b57a575 100644 (file)
@@ -40,13 +40,13 @@ static struct snd_soc_dai_link ln2440sbc_dai[] = {
 
 static struct snd_soc_card ln2440sbc = {
        .name = "LN2440SBC",
+       .platform = &s3c24xx_soc_platform,
        .dai_link = ln2440sbc_dai,
        .num_links = ARRAY_SIZE(ln2440sbc_dai),
 };
 
 static struct snd_soc_device ln2440sbc_snd_ac97_devdata = {
        .card = &ln2440sbc,
-       .platform = &s3c24xx_soc_platform,
        .codec_dev = &soc_codec_dev_ac97,
 };
 
index 3df2224a67238195cf46bb1638a875044d03fb63..45bb12e8ea447df922a5f99c02d9479569bd632d 100644 (file)
@@ -580,6 +580,7 @@ static struct snd_soc_dai_link neo1973_dai[] = {
 
 static struct snd_soc_card neo1973 = {
        .name = "neo1973",
+       .platform = &s3c24xx_soc_platform,
        .dai_link = neo1973_dai,
        .num_links = ARRAY_SIZE(neo1973_dai),
 };
@@ -591,7 +592,6 @@ static struct wm8753_setup_data neo1973_wm8753_setup = {
 
 static struct snd_soc_device neo1973_snd_devdata = {
        .card = &neo1973,
-       .platform = &s3c24xx_soc_platform,
        .codec_dev = &soc_codec_dev_wm8753,
        .codec_data = &neo1973_wm8753_setup,
 };
index 23325fca1f64e4c074d89862d818d55f0fe4e25e..a0a4d1832a1407db4a018100cb856eb87eea343c 100644 (file)
@@ -234,6 +234,7 @@ static struct snd_soc_dai_link s3c24xx_uda134x_dai_link = {
 
 static struct snd_soc_card snd_soc_s3c24xx_uda134x = {
        .name = "S3C24XX_UDA134X",
+       .platform = &s3c24xx_soc_platform,
        .dai_link = &s3c24xx_uda134x_dai_link,
        .num_links = 1,
 };
@@ -271,7 +272,6 @@ static struct uda134x_platform_data s3c24xx_uda134x = {
 
 static struct snd_soc_device s3c24xx_uda134x_snd_devdata = {
        .card = &snd_soc_s3c24xx_uda134x,
-       .platform = &s3c24xx_soc_platform,
        .codec_dev = &soc_codec_dev_uda134x,
        .codec_data = &s3c24xx_uda134x,
 };
index 3d2e6a0417ececed4e2c79805b036a327e20c78a..a2a4f5323c177b83e600a8271640407170556aa3 100644 (file)
@@ -36,13 +36,13 @@ static struct snd_soc_dai_link smdk2443_dai[] = {
 
 static struct snd_soc_card smdk2443 = {
        .name = "SMDK2443",
+       .platform = &s3c24xx_soc_platform,
        .dai_link = smdk2443_dai,
        .num_links = ARRAY_SIZE(smdk2443_dai),
 };
 
 static struct snd_soc_device smdk2443_snd_ac97_devdata = {
        .card = &smdk2443,
-       .platform = &s3c24xx_soc_platform,
        .codec_dev = &soc_codec_dev_ac97,
 };
 
index 8b44f9c8a9ff32d574877cafc8f759fad506a310..ce7f95b59de32aa3efe58bd46389ecb1d0b98c5e 100644 (file)
@@ -40,13 +40,13 @@ static struct snd_soc_dai_link sh7760_ac97_dai = {
 
 static struct snd_soc_card sh7760_ac97_soc_machine  = {
        .name = "SH7760 AC97",
+       .platform = &sh7760_soc_platform,
        .dai_link = &sh7760_ac97_dai,
        .num_links = 1,
 };
 
 static struct snd_soc_device sh7760_ac97_snd_devdata = {
        .card = &sh7760_ac97_soc_machine,
-       .platform = &sh7760_soc_platform,
        .codec_dev = &soc_codec_dev_ac97,
 };
 
index c4b22e6984e6a008139397c96bbaf90410e953b2..fe89260c90289b14a556a37be4f5f26b953b9606 100644 (file)
@@ -109,9 +109,10 @@ static int soc_pcm_open(struct snd_pcm_substream *substream)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_device *socdev = rtd->socdev;
+       struct snd_soc_card *card = socdev->card;
        struct snd_pcm_runtime *runtime = substream->runtime;
        struct snd_soc_dai_link *machine = rtd->dai;
-       struct snd_soc_platform *platform = socdev->platform;
+       struct snd_soc_platform *platform = card->platform;
        struct snd_soc_dai *cpu_dai = machine->cpu_dai;
        struct snd_soc_dai *codec_dai = machine->codec_dai;
        int ret = 0;
@@ -302,7 +303,7 @@ static int soc_codec_close(struct snd_pcm_substream *substream)
        struct snd_soc_device *socdev = rtd->socdev;
        struct snd_soc_card *card = socdev->card;
        struct snd_soc_dai_link *machine = rtd->dai;
-       struct snd_soc_platform *platform = socdev->platform;
+       struct snd_soc_platform *platform = card->platform;
        struct snd_soc_dai *cpu_dai = machine->cpu_dai;
        struct snd_soc_dai *codec_dai = machine->codec_dai;
        struct snd_soc_codec *codec = socdev->codec;
@@ -370,7 +371,7 @@ static int soc_pcm_prepare(struct snd_pcm_substream *substream)
        struct snd_soc_device *socdev = rtd->socdev;
        struct snd_soc_card *card = socdev->card;
        struct snd_soc_dai_link *machine = rtd->dai;
-       struct snd_soc_platform *platform = socdev->platform;
+       struct snd_soc_platform *platform = card->platform;
        struct snd_soc_dai *cpu_dai = machine->cpu_dai;
        struct snd_soc_dai *codec_dai = machine->codec_dai;
        struct snd_soc_codec *codec = socdev->codec;
@@ -464,7 +465,8 @@ static int soc_pcm_hw_params(struct snd_pcm_substream *substream,
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_device *socdev = rtd->socdev;
        struct snd_soc_dai_link *machine = rtd->dai;
-       struct snd_soc_platform *platform = socdev->platform;
+       struct snd_soc_card *card = socdev->card;
+       struct snd_soc_platform *platform = card->platform;
        struct snd_soc_dai *cpu_dai = machine->cpu_dai;
        struct snd_soc_dai *codec_dai = machine->codec_dai;
        int ret = 0;
@@ -534,7 +536,8 @@ static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_device *socdev = rtd->socdev;
        struct snd_soc_dai_link *machine = rtd->dai;
-       struct snd_soc_platform *platform = socdev->platform;
+       struct snd_soc_card *card = socdev->card;
+       struct snd_soc_platform *platform = card->platform;
        struct snd_soc_dai *cpu_dai = machine->cpu_dai;
        struct snd_soc_dai *codec_dai = machine->codec_dai;
        struct snd_soc_codec *codec = socdev->codec;
@@ -568,8 +571,9 @@ static int soc_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_device *socdev = rtd->socdev;
+       struct snd_soc_card *card= socdev->card;
        struct snd_soc_dai_link *machine = rtd->dai;
-       struct snd_soc_platform *platform = socdev->platform;
+       struct snd_soc_platform *platform = card->platform;
        struct snd_soc_dai *cpu_dai = machine->cpu_dai;
        struct snd_soc_dai *codec_dai = machine->codec_dai;
        int ret;
@@ -610,7 +614,7 @@ static int soc_suspend(struct platform_device *pdev, pm_message_t state)
 {
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
        struct snd_soc_card *card = socdev->card;
-       struct snd_soc_platform *platform = socdev->platform;
+       struct snd_soc_platform *platform = card->platform;
        struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
        struct snd_soc_codec *codec = socdev->codec;
        int i;
@@ -686,7 +690,7 @@ static void soc_resume_deferred(struct work_struct *work)
                                                 struct snd_soc_card,
                                                 deferred_resume_work);
        struct snd_soc_device *socdev = card->socdev;
-       struct snd_soc_platform *platform = socdev->platform;
+       struct snd_soc_platform *platform = card->platform;
        struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
        struct snd_soc_codec *codec = socdev->codec;
        struct platform_device *pdev = to_platform_device(socdev->dev);
@@ -770,7 +774,7 @@ static int soc_probe(struct platform_device *pdev)
        int ret = 0, i;
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
        struct snd_soc_card *card = socdev->card;
-       struct snd_soc_platform *platform = socdev->platform;
+       struct snd_soc_platform *platform = card->platform;
        struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
 
        /* Bodge while we push things out of socdev */
@@ -835,7 +839,7 @@ static int soc_remove(struct platform_device *pdev)
        int i;
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
        struct snd_soc_card *card = socdev->card;
-       struct snd_soc_platform *platform = socdev->platform;
+       struct snd_soc_platform *platform = card->platform;
        struct snd_soc_codec_device *codec_dev = socdev->codec_dev;
 
        run_delayed_work(&card->delayed_work);
@@ -875,6 +879,8 @@ static int soc_new_pcm(struct snd_soc_device *socdev,
        struct snd_soc_dai_link *dai_link, int num)
 {
        struct snd_soc_codec *codec = socdev->codec;
+       struct snd_soc_card *card = socdev->card;
+       struct snd_soc_platform *platform = card->platform;
        struct snd_soc_dai *codec_dai = dai_link->codec_dai;
        struct snd_soc_dai *cpu_dai = dai_link->cpu_dai;
        struct snd_soc_pcm_runtime *rtd;
@@ -910,13 +916,13 @@ static int soc_new_pcm(struct snd_soc_device *socdev,
 
        dai_link->pcm = pcm;
        pcm->private_data = rtd;
-       soc_pcm_ops.mmap = socdev->platform->pcm_ops->mmap;
-       soc_pcm_ops.pointer = socdev->platform->pcm_ops->pointer;
-       soc_pcm_ops.ioctl = socdev->platform->pcm_ops->ioctl;
-       soc_pcm_ops.copy = socdev->platform->pcm_ops->copy;
-       soc_pcm_ops.silence = socdev->platform->pcm_ops->silence;
-       soc_pcm_ops.ack = socdev->platform->pcm_ops->ack;
-       soc_pcm_ops.page = socdev->platform->pcm_ops->page;
+       soc_pcm_ops.mmap = platform->pcm_ops->mmap;
+       soc_pcm_ops.pointer = platform->pcm_ops->pointer;
+       soc_pcm_ops.ioctl = platform->pcm_ops->ioctl;
+       soc_pcm_ops.copy = platform->pcm_ops->copy;
+       soc_pcm_ops.silence = platform->pcm_ops->silence;
+       soc_pcm_ops.ack = platform->pcm_ops->ack;
+       soc_pcm_ops.page = platform->pcm_ops->page;
 
        if (playback)
                snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &soc_pcm_ops);
@@ -924,14 +930,14 @@ static int soc_new_pcm(struct snd_soc_device *socdev,
        if (capture)
                snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &soc_pcm_ops);
 
-       ret = socdev->platform->pcm_new(codec->card, codec_dai, pcm);
+       ret = platform->pcm_new(codec->card, codec_dai, pcm);
        if (ret < 0) {
                printk(KERN_ERR "asoc: platform pcm constructor failed\n");
                kfree(rtd);
                return ret;
        }
 
-       pcm->private_free = socdev->platform->pcm_free;
+       pcm->private_free = platform->pcm_free;
        printk(KERN_INFO "asoc: %s <-> %s mapping ok\n", codec_dai->name,
                cpu_dai->name);
        return ret;