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/es18xx.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/es18xx.c')
-rw-r--r-- | sound/isa/es18xx.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index 12978b864c3a..1c16830af3d8 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c @@ -2105,10 +2105,11 @@ static int snd_audiodrive_pnpc(int dev, struct snd_es18xx *chip, #define is_isapnp_selected(dev) 0 #endif -static int snd_es18xx_card_new(int dev, struct snd_card **cardp) +static int snd_es18xx_card_new(struct device *pdev, int dev, + struct snd_card **cardp) { - return snd_card_create(index[dev], id[dev], THIS_MODULE, - sizeof(struct snd_es18xx), cardp); + return snd_card_new(pdev, index[dev], id[dev], THIS_MODULE, + sizeof(struct snd_es18xx), cardp); } static int snd_audiodrive_probe(struct snd_card *card, int dev) @@ -2179,10 +2180,9 @@ static int snd_es18xx_isa_probe1(int dev, struct device *devptr) struct snd_card *card; int err; - err = snd_es18xx_card_new(dev, &card); + err = snd_es18xx_card_new(devptr, dev, &card); if (err < 0) return err; - snd_card_set_dev(card, devptr); if ((err = snd_audiodrive_probe(card, dev)) < 0) { snd_card_free(card); return err; @@ -2284,14 +2284,13 @@ static int snd_audiodrive_pnp_detect(struct pnp_dev *pdev, if (dev >= SNDRV_CARDS) return -ENODEV; - err = snd_es18xx_card_new(dev, &card); + err = snd_es18xx_card_new(&pdev->dev, dev, &card); if (err < 0) return err; if ((err = snd_audiodrive_pnp(dev, card->private_data, pdev)) < 0) { snd_card_free(card); return err; } - snd_card_set_dev(card, &pdev->dev); if ((err = snd_audiodrive_probe(card, dev)) < 0) { snd_card_free(card); return err; @@ -2342,7 +2341,7 @@ static int snd_audiodrive_pnpc_detect(struct pnp_card_link *pcard, if (dev >= SNDRV_CARDS) return -ENODEV; - res = snd_es18xx_card_new(dev, &card); + res = snd_es18xx_card_new(&pcard->card->dev, dev, &card); if (res < 0) return res; @@ -2350,7 +2349,6 @@ static int snd_audiodrive_pnpc_detect(struct pnp_card_link *pcard, snd_card_free(card); return res; } - snd_card_set_dev(card, &pcard->card->dev); if ((res = snd_audiodrive_probe(card, dev)) < 0) { snd_card_free(card); return res; |