diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-01-29 13:03:56 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-12 10:58:21 +0100 |
commit | 4323cc4d5b25b5138c0791e3c7d3b09bd7062b49 (patch) | |
tree | 864a8549eae025d2108cefbb19bc61e18a9bc659 /sound/isa/sb/sb16.c | |
parent | ALSA: drivers: Convert to snd_card_new() with a device pointer (diff) | |
download | linux-4323cc4d5b25b5138c0791e3c7d3b09bd7062b49.tar.xz linux-4323cc4d5b25b5138c0791e3c7d3b09bd7062b49.zip |
ALSA: isa: Convert to snd_card_new() with a device pointer
Also remove superfluous snd_card_set_dev() calls.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/sb/sb16.c')
-rw-r--r-- | sound/isa/sb/sb16.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/isa/sb/sb16.c b/sound/isa/sb/sb16.c index a4130993955f..3f694543a7ea 100644 --- a/sound/isa/sb/sb16.c +++ b/sound/isa/sb/sb16.c @@ -323,13 +323,14 @@ static void snd_sb16_free(struct snd_card *card) #define is_isapnp_selected(dev) 0 #endif -static int snd_sb16_card_new(int dev, struct snd_card **cardp) +static int snd_sb16_card_new(struct device *devptr, int dev, + struct snd_card **cardp) { struct snd_card *card; int err; - err = snd_card_create(index[dev], id[dev], THIS_MODULE, - sizeof(struct snd_card_sb16), &card); + err = snd_card_new(devptr, index[dev], id[dev], THIS_MODULE, + sizeof(struct snd_card_sb16), &card); if (err < 0) return err; card->private_free = snd_sb16_free; @@ -493,7 +494,7 @@ static int snd_sb16_isa_probe1(int dev, struct device *pdev) struct snd_card *card; int err; - err = snd_sb16_card_new(dev, &card); + err = snd_sb16_card_new(pdev, dev, &card); if (err < 0) return err; @@ -507,7 +508,6 @@ static int snd_sb16_isa_probe1(int dev, struct device *pdev) awe_port[dev] = port[dev] + 0x400; #endif - snd_card_set_dev(card, pdev); if ((err = snd_sb16_probe(card, dev)) < 0) { snd_card_free(card); return err; @@ -613,10 +613,9 @@ static int snd_sb16_pnp_detect(struct pnp_card_link *pcard, for ( ; dev < SNDRV_CARDS; dev++) { if (!enable[dev] || !isapnp[dev]) continue; - res = snd_sb16_card_new(dev, &card); + res = snd_sb16_card_new(&pcard->card->dev, dev, &card); if (res < 0) return res; - snd_card_set_dev(card, &pcard->card->dev); if ((res = snd_card_sb16_pnp(dev, card->private_data, pcard, pid)) < 0 || (res = snd_sb16_probe(card, dev)) < 0) { snd_card_free(card); |