aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/wavefront/wavefront.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/wavefront/wavefront.c')
-rw-r--r--sound/isa/wavefront/wavefront.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c
index 82dd76939fa0..bfbf38cf9841 100644
--- a/sound/isa/wavefront/wavefront.c
+++ b/sound/isa/wavefront/wavefront.c
@@ -334,14 +334,15 @@ snd_wavefront_free(struct snd_card *card)
334 } 334 }
335} 335}
336 336
337static int snd_wavefront_card_new(int dev, struct snd_card **cardp) 337static int snd_wavefront_card_new(struct device *pdev, int dev,
338 struct snd_card **cardp)
338{ 339{
339 struct snd_card *card; 340 struct snd_card *card;
340 snd_wavefront_card_t *acard; 341 snd_wavefront_card_t *acard;
341 int err; 342 int err;
342 343
343 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 344 err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
344 sizeof(snd_wavefront_card_t), &card); 345 sizeof(snd_wavefront_card_t), &card);
345 if (err < 0) 346 if (err < 0)
346 return err; 347 return err;
347 348
@@ -564,10 +565,9 @@ static int snd_wavefront_isa_probe(struct device *pdev,
564 struct snd_card *card; 565 struct snd_card *card;
565 int err; 566 int err;
566 567
567 err = snd_wavefront_card_new(dev, &card); 568 err = snd_wavefront_card_new(pdev, dev, &card);
568 if (err < 0) 569 if (err < 0)
569 return err; 570 return err;
570 snd_card_set_dev(card, pdev);
571 if ((err = snd_wavefront_probe(card, dev)) < 0) { 571 if ((err = snd_wavefront_probe(card, dev)) < 0) {
572 snd_card_free(card); 572 snd_card_free(card);
573 return err; 573 return err;
@@ -612,7 +612,7 @@ static int snd_wavefront_pnp_detect(struct pnp_card_link *pcard,
612 if (dev >= SNDRV_CARDS) 612 if (dev >= SNDRV_CARDS)
613 return -ENODEV; 613 return -ENODEV;
614 614
615 res = snd_wavefront_card_new(dev, &card); 615 res = snd_wavefront_card_new(&pcard->card->dev, dev, &card);
616 if (res < 0) 616 if (res < 0)
617 return res; 617 return res;
618 618
@@ -623,7 +623,6 @@ static int snd_wavefront_pnp_detect(struct pnp_card_link *pcard,
623 return -ENODEV; 623 return -ENODEV;
624 } 624 }
625 } 625 }
626 snd_card_set_dev(card, &pcard->card->dev);
627 626
628 if ((res = snd_wavefront_probe(card, dev)) < 0) 627 if ((res = snd_wavefront_probe(card, dev)) < 0)
629 return res; 628 return res;