diff options
Diffstat (limited to 'sound/isa/sb')
-rw-r--r-- | sound/isa/sb/jazz16.c | 6 | ||||
-rw-r--r-- | sound/isa/sb/sb16.c | 13 | ||||
-rw-r--r-- | sound/isa/sb/sb8.c | 6 |
3 files changed, 10 insertions, 15 deletions
diff --git a/sound/isa/sb/jazz16.c b/sound/isa/sb/jazz16.c index 356a6308392f..90d2eba549e9 100644 --- a/sound/isa/sb/jazz16.c +++ b/sound/isa/sb/jazz16.c @@ -229,8 +229,8 @@ static int snd_jazz16_probe(struct device *devptr, unsigned int dev) static int possible_dmas16[] = {5, 7, -1}; int err, xirq, xdma8, xdma16, xmpu_port, xmpu_irq; - err = snd_card_create(index[dev], id[dev], THIS_MODULE, - sizeof(struct snd_card_jazz16), &card); + err = snd_card_new(devptr, index[dev], id[dev], THIS_MODULE, + sizeof(struct snd_card_jazz16), &card); if (err < 0) return err; @@ -327,8 +327,6 @@ static int snd_jazz16_probe(struct device *devptr, unsigned int dev) mpu_port[dev]); } - snd_card_set_dev(card, devptr); - err = snd_card_register(card); if (err < 0) goto err_free; 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); diff --git a/sound/isa/sb/sb8.c b/sound/isa/sb/sb8.c index a806ae90a944..6c32b3aa34af 100644 --- a/sound/isa/sb/sb8.c +++ b/sound/isa/sb/sb8.c @@ -102,8 +102,8 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev) struct snd_opl3 *opl3; int err; - err = snd_card_create(index[dev], id[dev], THIS_MODULE, - sizeof(struct snd_sb8), &card); + err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE, + sizeof(struct snd_sb8), &card); if (err < 0) return err; acard = card->private_data; @@ -192,8 +192,6 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev) chip->port, irq[dev], dma8[dev]); - snd_card_set_dev(card, pdev); - if ((err = snd_card_register(card)) < 0) goto _err; |