Commit 4a875580 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: arm: Convert to snd_card_new() with a device pointer

Also remove superfluous snd_card_set_dev() calls.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 06b45f00
...@@ -899,8 +899,8 @@ static struct aaci *aaci_init_card(struct amba_device *dev) ...@@ -899,8 +899,8 @@ static struct aaci *aaci_init_card(struct amba_device *dev)
struct snd_card *card; struct snd_card *card;
int err; int err;
err = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, err = snd_card_new(&dev->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
THIS_MODULE, sizeof(struct aaci), &card); THIS_MODULE, sizeof(struct aaci), &card);
if (err < 0) if (err < 0)
return NULL; return NULL;
...@@ -1055,8 +1055,6 @@ static int aaci_probe(struct amba_device *dev, ...@@ -1055,8 +1055,6 @@ static int aaci_probe(struct amba_device *dev,
if (ret) if (ret)
goto out; goto out;
snd_card_set_dev(aaci->card, &dev->dev);
ret = snd_card_register(aaci->card); ret = snd_card_register(aaci->card);
if (ret == 0) { if (ret == 0) {
dev_info(&dev->dev, "%s\n", aaci->card->longname); dev_info(&dev->dev, "%s\n", aaci->card->longname);
......
...@@ -179,12 +179,11 @@ static int pxa2xx_ac97_probe(struct platform_device *dev) ...@@ -179,12 +179,11 @@ static int pxa2xx_ac97_probe(struct platform_device *dev)
goto err_dev; goto err_dev;
} }
ret = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, ret = snd_card_new(&dev->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
THIS_MODULE, 0, &card); THIS_MODULE, 0, &card);
if (ret < 0) if (ret < 0)
goto err; goto err;
card->dev = &dev->dev;
strlcpy(card->driver, dev->dev.driver->name, sizeof(card->driver)); strlcpy(card->driver, dev->dev.driver->name, sizeof(card->driver));
ret = pxa2xx_pcm_new(card, &pxa2xx_ac97_pcm_client, &pxa2xx_ac97_pcm); ret = pxa2xx_pcm_new(card, &pxa2xx_ac97_pcm_client, &pxa2xx_ac97_pcm);
...@@ -210,7 +209,6 @@ static int pxa2xx_ac97_probe(struct platform_device *dev) ...@@ -210,7 +209,6 @@ static int pxa2xx_ac97_probe(struct platform_device *dev)
if (pdata && pdata->codec_pdata[0]) if (pdata && pdata->codec_pdata[0])
snd_ac97_dev_add_pdata(ac97_bus->codec[0], pdata->codec_pdata[0]); snd_ac97_dev_add_pdata(ac97_bus->codec[0], pdata->codec_pdata[0]);
snd_card_set_dev(card, &dev->dev);
ret = snd_card_register(card); ret = snd_card_register(card);
if (ret == 0) { if (ret == 0) {
platform_set_drvdata(dev, card); platform_set_drvdata(dev, card);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment