From e5ff9c54a431d44109f7a2f573cea222628bcecd Mon Sep 17 00:00:00 2001 From: Mike Dunn Date: Sat, 29 Dec 2012 10:53:18 -0800 Subject: [PATCH] --- yaml --- r: 353396 b: refs/heads/master c: 01a61f490cab732542753db69e17e5db657d185a h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/pxa/palm27x.c | 23 ++++++----------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/[refs] b/[refs] index 7f317a4f3d85..23b0f0a3b118 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 016fb39c98a71539d9abd5ee66cc1103a32fbb34 +refs/heads/master: 01a61f490cab732542753db69e17e5db657d185a diff --git a/trunk/sound/soc/pxa/palm27x.c b/trunk/sound/soc/pxa/palm27x.c index bb062e6b9db5..e1ffcdd9a649 100644 --- a/trunk/sound/soc/pxa/palm27x.c +++ b/trunk/sound/soc/pxa/palm27x.c @@ -144,8 +144,6 @@ static struct snd_soc_card palm27x_asoc = { .num_dapm_routes = ARRAY_SIZE(audio_map) }; -static struct platform_device *palm27x_snd_device; - static int palm27x_asoc_probe(struct platform_device *pdev) { int ret; @@ -162,27 +160,18 @@ static int palm27x_asoc_probe(struct platform_device *pdev) hs_jack_gpios[0].gpio = ((struct palm27x_asoc_info *) (pdev->dev.platform_data))->jack_gpio; - palm27x_snd_device = platform_device_alloc("soc-audio", -1); - if (!palm27x_snd_device) - return -ENOMEM; - - platform_set_drvdata(palm27x_snd_device, &palm27x_asoc); - ret = platform_device_add(palm27x_snd_device); - - if (ret != 0) - goto put_device; - - return 0; - -put_device: - platform_device_put(palm27x_snd_device); + palm27x_asoc.dev = &pdev->dev; + ret = snd_soc_register_card(&palm27x_asoc); + if (ret) + dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n", + ret); return ret; } static int palm27x_asoc_remove(struct platform_device *pdev) { - platform_device_unregister(palm27x_snd_device); + snd_soc_unregister_card(&palm27x_asoc); return 0; }