Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316280
b: refs/heads/master
c: 9c9acc9
h: refs/heads/master
v: v3
  • Loading branch information
Sachin Kamat authored and Mark Brown committed Jul 3, 2012
1 parent f24633a commit d15851f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a720718b37d00cf8ab311902705ae7c7890bb95
refs/heads/master: 9c9acc91561221c30a530c9b84056609d0307c7c
36 changes: 23 additions & 13 deletions trunk/sound/soc/samsung/smdk_wm8994.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,31 +149,41 @@ static struct snd_soc_card smdk = {
.num_links = ARRAY_SIZE(smdk_dai),
};

static struct platform_device *smdk_snd_device;

static int __init smdk_audio_init(void)
static int __devinit smdk_audio_probe(struct platform_device *pdev)
{
int ret;
struct snd_soc_card *card = &smdk;

smdk_snd_device = platform_device_alloc("soc-audio", -1);
if (!smdk_snd_device)
return -ENOMEM;
card->dev = &pdev->dev;
ret = snd_soc_register_card(card);

platform_set_drvdata(smdk_snd_device, &smdk);

ret = platform_device_add(smdk_snd_device);
if (ret)
platform_device_put(smdk_snd_device);
dev_err(&pdev->dev, "snd_soc_register_card() failed:%d\n", ret);

return ret;
}
module_init(smdk_audio_init);

static void __exit smdk_audio_exit(void)
static int __devexit smdk_audio_remove(struct platform_device *pdev)
{
platform_device_unregister(smdk_snd_device);
struct snd_soc_card *card = platform_get_drvdata(pdev);

snd_soc_unregister_card(card);

return 0;
}
module_exit(smdk_audio_exit);

static struct platform_driver smdk_audio_driver = {
.driver = {
.name = "smdk-audio",
.owner = THIS_MODULE,
},
.probe = smdk_audio_probe,
.remove = __devexit_p(smdk_audio_remove),
};

module_platform_driver(smdk_audio_driver);

MODULE_DESCRIPTION("ALSA SoC SMDK WM8994");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:smdk-audio");

0 comments on commit d15851f

Please sign in to comment.