diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-09-22 18:31:08 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-09-22 18:31:08 +0200 |
commit | 3d98c21d064bfbb8c6fddc659471acb4950320fa (patch) | |
tree | a506fbe4cca3616f328cdf761a45d0a09ce38237 /sound/soc/fsl/p1022_ds.c | |
parent | 99df18b31db389ec6abc8ad5415c14e7bb752b58 (diff) | |
parent | ddfb43f3881edb47aa0083651ad31983cdc42c33 (diff) | |
download | talos-op-linux-3d98c21d064bfbb8c6fddc659471acb4950320fa.tar.gz talos-op-linux-3d98c21d064bfbb8c6fddc659471acb4950320fa.zip |
Merge tag 'asoc-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Updates for v3.7
Lots and lots of driver specific cleanups and enhancements but the only
substantial framework feature this time round is the compressed API
binding:
- Addition of ASoC bindings for the compressed API, used by the mid-x86
drivers.
- Lots of cleanups and API refreshes for CODEC drivers and DaVinci.
- Conversion of OMAP to dmaengine.
- New machine driver for Wolfson Microelectronics Bells.
- New CODEC driver for Wolfson Microelectronics WM0010.
Diffstat (limited to 'sound/soc/fsl/p1022_ds.c')
-rw-r--r-- | sound/soc/fsl/p1022_ds.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c index 50adf4032bcc..144d49603637 100644 --- a/sound/soc/fsl/p1022_ds.c +++ b/sound/soc/fsl/p1022_ds.c @@ -202,7 +202,6 @@ static int p1022_ds_probe(struct platform_device *pdev) container_of(dev, struct platform_device, dev); struct device_node *np = ssi_pdev->dev.of_node; struct device_node *codec_np = NULL; - struct platform_device *sound_device = NULL; struct machine_data *mdata; int ret = -ENODEV; const char *sprop; @@ -349,36 +348,23 @@ static int p1022_ds_probe(struct platform_device *pdev) mdata->card.probe = p1022_ds_machine_probe; mdata->card.remove = p1022_ds_machine_remove; mdata->card.name = pdev->name; /* The platform driver name */ + mdata->card.owner = THIS_MODULE; + mdata->card.dev = &pdev->dev; mdata->card.num_links = 2; mdata->card.dai_link = mdata->dai; - /* Allocate a new audio platform device structure */ - sound_device = platform_device_alloc("soc-audio", -1); - if (!sound_device) { - dev_err(&pdev->dev, "platform device alloc failed\n"); - ret = -ENOMEM; - goto error; - } - - /* Associate the card data with the sound device */ - platform_set_drvdata(sound_device, &mdata->card); - /* Register with ASoC */ - ret = platform_device_add(sound_device); + ret = snd_soc_register_card(&mdata->card); if (ret) { - dev_err(&pdev->dev, "platform device add failed\n"); + dev_err(&pdev->dev, "could not register card\n"); goto error; } - dev_set_drvdata(&pdev->dev, sound_device); of_node_put(codec_np); return 0; error: - if (sound_device) - platform_device_put(sound_device); - kfree(mdata); error_put: of_node_put(codec_np); @@ -392,17 +378,12 @@ error_put: */ static int __devexit p1022_ds_remove(struct platform_device *pdev) { - struct platform_device *sound_device = dev_get_drvdata(&pdev->dev); - struct snd_soc_card *card = platform_get_drvdata(sound_device); + struct snd_soc_card *card = platform_get_drvdata(pdev); struct machine_data *mdata = container_of(card, struct machine_data, card); - platform_device_unregister(sound_device); - + snd_soc_unregister_card(card); kfree(mdata); - sound_device->dev.platform_data = NULL; - - dev_set_drvdata(&pdev->dev, NULL); return 0; } |