diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-01-29 07:03:56 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-12 04:58:21 -0500 |
commit | 4323cc4d5b25b5138c0791e3c7d3b09bd7062b49 (patch) | |
tree | 864a8549eae025d2108cefbb19bc61e18a9bc659 /sound/isa/gus | |
parent | 5872f3f621f9f65342583a85ec93b00c0a697eda (diff) |
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/gus')
-rw-r--r-- | sound/isa/gus/gusclassic.c | 4 | ||||
-rw-r--r-- | sound/isa/gus/gusextreme.c | 6 | ||||
-rw-r--r-- | sound/isa/gus/gusmax.c | 6 | ||||
-rw-r--r-- | sound/isa/gus/interwave.c | 13 |
4 files changed, 11 insertions, 18 deletions
diff --git a/sound/isa/gus/gusclassic.c b/sound/isa/gus/gusclassic.c index 1adc1b924f39..7ce29ffa1af9 100644 --- a/sound/isa/gus/gusclassic.c +++ b/sound/isa/gus/gusclassic.c | |||
@@ -149,7 +149,7 @@ static int snd_gusclassic_probe(struct device *dev, unsigned int n) | |||
149 | struct snd_gus_card *gus; | 149 | struct snd_gus_card *gus; |
150 | int error; | 150 | int error; |
151 | 151 | ||
152 | error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card); | 152 | error = snd_card_new(dev, index[n], id[n], THIS_MODULE, 0, &card); |
153 | if (error < 0) | 153 | if (error < 0) |
154 | return error; | 154 | return error; |
155 | 155 | ||
@@ -199,8 +199,6 @@ static int snd_gusclassic_probe(struct device *dev, unsigned int n) | |||
199 | sprintf(card->longname + strlen(card->longname), | 199 | sprintf(card->longname + strlen(card->longname), |
200 | "&%d", gus->gf1.dma2); | 200 | "&%d", gus->gf1.dma2); |
201 | 201 | ||
202 | snd_card_set_dev(card, dev); | ||
203 | |||
204 | error = snd_card_register(card); | 202 | error = snd_card_register(card); |
205 | if (error < 0) | 203 | if (error < 0) |
206 | goto out; | 204 | goto out; |
diff --git a/sound/isa/gus/gusextreme.c b/sound/isa/gus/gusextreme.c index 38e1e3260c24..28a16936a397 100644 --- a/sound/isa/gus/gusextreme.c +++ b/sound/isa/gus/gusextreme.c | |||
@@ -242,8 +242,8 @@ static int snd_gusextreme_probe(struct device *dev, unsigned int n) | |||
242 | struct snd_opl3 *opl3; | 242 | struct snd_opl3 *opl3; |
243 | int error; | 243 | int error; |
244 | 244 | ||
245 | error = snd_card_create(index[n], id[n], THIS_MODULE, | 245 | error = snd_card_new(dev, index[n], id[n], THIS_MODULE, |
246 | sizeof(struct snd_es1688), &card); | 246 | sizeof(struct snd_es1688), &card); |
247 | if (error < 0) | 247 | if (error < 0) |
248 | return error; | 248 | return error; |
249 | 249 | ||
@@ -328,8 +328,6 @@ static int snd_gusextreme_probe(struct device *dev, unsigned int n) | |||
328 | "irq %i&%i, dma %i&%i", es1688->port, | 328 | "irq %i&%i, dma %i&%i", es1688->port, |
329 | gus->gf1.irq, es1688->irq, gus->gf1.dma1, es1688->dma8); | 329 | gus->gf1.irq, es1688->irq, gus->gf1.dma1, es1688->dma8); |
330 | 330 | ||
331 | snd_card_set_dev(card, dev); | ||
332 | |||
333 | error = snd_card_register(card); | 331 | error = snd_card_register(card); |
334 | if (error < 0) | 332 | if (error < 0) |
335 | goto out; | 333 | goto out; |
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c index 652d5d834620..39df36ca3acb 100644 --- a/sound/isa/gus/gusmax.c +++ b/sound/isa/gus/gusmax.c | |||
@@ -214,8 +214,8 @@ static int snd_gusmax_probe(struct device *pdev, unsigned int dev) | |||
214 | struct snd_wss *wss; | 214 | struct snd_wss *wss; |
215 | struct snd_gusmax *maxcard; | 215 | struct snd_gusmax *maxcard; |
216 | 216 | ||
217 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, | 217 | err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE, |
218 | sizeof(struct snd_gusmax), &card); | 218 | sizeof(struct snd_gusmax), &card); |
219 | if (err < 0) | 219 | if (err < 0) |
220 | return err; | 220 | return err; |
221 | card->private_free = snd_gusmax_free; | 221 | card->private_free = snd_gusmax_free; |
@@ -337,8 +337,6 @@ static int snd_gusmax_probe(struct device *pdev, unsigned int dev) | |||
337 | if (xdma2 >= 0) | 337 | if (xdma2 >= 0) |
338 | sprintf(card->longname + strlen(card->longname), "&%i", xdma2); | 338 | sprintf(card->longname + strlen(card->longname), "&%i", xdma2); |
339 | 339 | ||
340 | snd_card_set_dev(card, pdev); | ||
341 | |||
342 | err = snd_card_register(card); | 340 | err = snd_card_register(card); |
343 | if (err < 0) | 341 | if (err < 0) |
344 | goto _err; | 342 | goto _err; |
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index afef0d738078..5abbbe477d16 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c | |||
@@ -625,14 +625,15 @@ static void snd_interwave_free(struct snd_card *card) | |||
625 | free_irq(iwcard->irq, (void *)iwcard); | 625 | free_irq(iwcard->irq, (void *)iwcard); |
626 | } | 626 | } |
627 | 627 | ||
628 | static int snd_interwave_card_new(int dev, struct snd_card **cardp) | 628 | static int snd_interwave_card_new(struct device *pdev, int dev, |
629 | struct snd_card **cardp) | ||
629 | { | 630 | { |
630 | struct snd_card *card; | 631 | struct snd_card *card; |
631 | struct snd_interwave *iwcard; | 632 | struct snd_interwave *iwcard; |
632 | int err; | 633 | int err; |
633 | 634 | ||
634 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, | 635 | err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE, |
635 | sizeof(struct snd_interwave), &card); | 636 | sizeof(struct snd_interwave), &card); |
636 | if (err < 0) | 637 | if (err < 0) |
637 | return err; | 638 | return err; |
638 | iwcard = card->private_data; | 639 | iwcard = card->private_data; |
@@ -779,11 +780,10 @@ static int snd_interwave_isa_probe1(int dev, struct device *devptr) | |||
779 | struct snd_card *card; | 780 | struct snd_card *card; |
780 | int err; | 781 | int err; |
781 | 782 | ||
782 | err = snd_interwave_card_new(dev, &card); | 783 | err = snd_interwave_card_new(devptr, dev, &card); |
783 | if (err < 0) | 784 | if (err < 0) |
784 | return err; | 785 | return err; |
785 | 786 | ||
786 | snd_card_set_dev(card, devptr); | ||
787 | if ((err = snd_interwave_probe(card, dev)) < 0) { | 787 | if ((err = snd_interwave_probe(card, dev)) < 0) { |
788 | snd_card_free(card); | 788 | snd_card_free(card); |
789 | return err; | 789 | return err; |
@@ -876,7 +876,7 @@ static int snd_interwave_pnp_detect(struct pnp_card_link *pcard, | |||
876 | if (dev >= SNDRV_CARDS) | 876 | if (dev >= SNDRV_CARDS) |
877 | return -ENODEV; | 877 | return -ENODEV; |
878 | 878 | ||
879 | res = snd_interwave_card_new(dev, &card); | 879 | res = snd_interwave_card_new(&pcard->card->dev, dev, &card); |
880 | if (res < 0) | 880 | if (res < 0) |
881 | return res; | 881 | return res; |
882 | 882 | ||
@@ -884,7 +884,6 @@ static int snd_interwave_pnp_detect(struct pnp_card_link *pcard, | |||
884 | snd_card_free(card); | 884 | snd_card_free(card); |
885 | return res; | 885 | return res; |
886 | } | 886 | } |
887 | snd_card_set_dev(card, &pcard->card->dev); | ||
888 | if ((res = snd_interwave_probe(card, dev)) < 0) { | 887 | if ((res = snd_interwave_probe(card, dev)) < 0) { |
889 | snd_card_free(card); | 888 | snd_card_free(card); |
890 | return res; | 889 | return res; |