aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-01-29 07:03:56 -0500
committerTakashi Iwai <tiwai@suse.de>2014-02-12 04:58:21 -0500
commit4323cc4d5b25b5138c0791e3c7d3b09bd7062b49 (patch)
tree864a8549eae025d2108cefbb19bc61e18a9bc659 /sound/isa
parent5872f3f621f9f65342583a85ec93b00c0a697eda (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')
-rw-r--r--sound/isa/ad1816a/ad1816a.c6
-rw-r--r--sound/isa/ad1848/ad1848.c4
-rw-r--r--sound/isa/adlib.c4
-rw-r--r--sound/isa/als100.c6
-rw-r--r--sound/isa/azt2320.c6
-rw-r--r--sound/isa/cmi8328.c5
-rw-r--r--sound/isa/cmi8330.c13
-rw-r--r--sound/isa/cs423x/cs4231.c4
-rw-r--r--sound/isa/cs423x/cs4236.c16
-rw-r--r--sound/isa/es1688/es1688.c12
-rw-r--r--sound/isa/es18xx.c16
-rw-r--r--sound/isa/galaxy/galaxy.c6
-rw-r--r--sound/isa/gus/gusclassic.c4
-rw-r--r--sound/isa/gus/gusextreme.c6
-rw-r--r--sound/isa/gus/gusmax.c6
-rw-r--r--sound/isa/gus/interwave.c13
-rw-r--r--sound/isa/msnd/msnd_pinnacle.c11
-rw-r--r--sound/isa/opl3sa2.c16
-rw-r--r--sound/isa/opti9xx/miro.c11
-rw-r--r--sound/isa/opti9xx/opti92x-ad1848.c12
-rw-r--r--sound/isa/sb/jazz16.c6
-rw-r--r--sound/isa/sb/sb16.c13
-rw-r--r--sound/isa/sb/sb8.c6
-rw-r--r--sound/isa/sc6000.c6
-rw-r--r--sound/isa/sscape.c11
-rw-r--r--sound/isa/wavefront/wavefront.c13
26 files changed, 96 insertions, 136 deletions
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c
index 26ce26a5884d..f481a41e027e 100644
--- a/sound/isa/ad1816a/ad1816a.c
+++ b/sound/isa/ad1816a/ad1816a.c
@@ -144,8 +144,9 @@ static int snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard,
144 struct snd_opl3 *opl3; 144 struct snd_opl3 *opl3;
145 struct snd_timer *timer; 145 struct snd_timer *timer;
146 146
147 error = snd_card_create(index[dev], id[dev], THIS_MODULE, 147 error = snd_card_new(&pcard->card->dev,
148 sizeof(struct snd_ad1816a), &card); 148 index[dev], id[dev], THIS_MODULE,
149 sizeof(struct snd_ad1816a), &card);
149 if (error < 0) 150 if (error < 0)
150 return error; 151 return error;
151 chip = card->private_data; 152 chip = card->private_data;
@@ -154,7 +155,6 @@ static int snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard,
154 snd_card_free(card); 155 snd_card_free(card);
155 return error; 156 return error;
156 } 157 }
157 snd_card_set_dev(card, &pcard->card->dev);
158 158
159 if ((error = snd_ad1816a_create(card, port[dev], 159 if ((error = snd_ad1816a_create(card, port[dev],
160 irq[dev], 160 irq[dev],
diff --git a/sound/isa/ad1848/ad1848.c b/sound/isa/ad1848/ad1848.c
index e3f455bd85cd..093f22a464d7 100644
--- a/sound/isa/ad1848/ad1848.c
+++ b/sound/isa/ad1848/ad1848.c
@@ -91,7 +91,7 @@ static int snd_ad1848_probe(struct device *dev, unsigned int n)
91 struct snd_pcm *pcm; 91 struct snd_pcm *pcm;
92 int error; 92 int error;
93 93
94 error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card); 94 error = snd_card_new(dev, index[n], id[n], THIS_MODULE, 0, &card);
95 if (error < 0) 95 if (error < 0)
96 return error; 96 return error;
97 97
@@ -119,8 +119,6 @@ static int snd_ad1848_probe(struct device *dev, unsigned int n)
119 if (thinkpad[n]) 119 if (thinkpad[n])
120 strcat(card->longname, " [Thinkpad]"); 120 strcat(card->longname, " [Thinkpad]");
121 121
122 snd_card_set_dev(card, dev);
123
124 error = snd_card_register(card); 122 error = snd_card_register(card);
125 if (error < 0) 123 if (error < 0)
126 goto out; 124 goto out;
diff --git a/sound/isa/adlib.c b/sound/isa/adlib.c
index 35659218710f..120c524bb2a0 100644
--- a/sound/isa/adlib.c
+++ b/sound/isa/adlib.c
@@ -53,7 +53,7 @@ static int snd_adlib_probe(struct device *dev, unsigned int n)
53 struct snd_opl3 *opl3; 53 struct snd_opl3 *opl3;
54 int error; 54 int error;
55 55
56 error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card); 56 error = snd_card_new(dev, index[n], id[n], THIS_MODULE, 0, &card);
57 if (error < 0) { 57 if (error < 0) {
58 dev_err(dev, "could not create card\n"); 58 dev_err(dev, "could not create card\n");
59 return error; 59 return error;
@@ -83,8 +83,6 @@ static int snd_adlib_probe(struct device *dev, unsigned int n)
83 goto out; 83 goto out;
84 } 84 }
85 85
86 snd_card_set_dev(card, dev);
87
88 error = snd_card_register(card); 86 error = snd_card_register(card);
89 if (error < 0) { 87 if (error < 0) {
90 dev_err(dev, "could not register card\n"); 88 dev_err(dev, "could not register card\n");
diff --git a/sound/isa/als100.c b/sound/isa/als100.c
index 10f08a18fe3b..32d01525211d 100644
--- a/sound/isa/als100.c
+++ b/sound/isa/als100.c
@@ -193,8 +193,9 @@ static int snd_card_als100_probe(int dev,
193 struct snd_card_als100 *acard; 193 struct snd_card_als100 *acard;
194 struct snd_opl3 *opl3; 194 struct snd_opl3 *opl3;
195 195
196 error = snd_card_create(index[dev], id[dev], THIS_MODULE, 196 error = snd_card_new(&pcard->card->dev,
197 sizeof(struct snd_card_als100), &card); 197 index[dev], id[dev], THIS_MODULE,
198 sizeof(struct snd_card_als100), &card);
198 if (error < 0) 199 if (error < 0)
199 return error; 200 return error;
200 acard = card->private_data; 201 acard = card->private_data;
@@ -203,7 +204,6 @@ static int snd_card_als100_probe(int dev,
203 snd_card_free(card); 204 snd_card_free(card);
204 return error; 205 return error;
205 } 206 }
206 snd_card_set_dev(card, &pcard->card->dev);
207 207
208 if (pid->driver_data == SB_HW_DT019X) 208 if (pid->driver_data == SB_HW_DT019X)
209 dma16[dev] = -1; 209 dma16[dev] = -1;
diff --git a/sound/isa/azt2320.c b/sound/isa/azt2320.c
index db301ff94ec2..0ea75fc62072 100644
--- a/sound/isa/azt2320.c
+++ b/sound/isa/azt2320.c
@@ -184,8 +184,9 @@ static int snd_card_azt2320_probe(int dev,
184 struct snd_wss *chip; 184 struct snd_wss *chip;
185 struct snd_opl3 *opl3; 185 struct snd_opl3 *opl3;
186 186
187 error = snd_card_create(index[dev], id[dev], THIS_MODULE, 187 error = snd_card_new(&pcard->card->dev,
188 sizeof(struct snd_card_azt2320), &card); 188 index[dev], id[dev], THIS_MODULE,
189 sizeof(struct snd_card_azt2320), &card);
189 if (error < 0) 190 if (error < 0)
190 return error; 191 return error;
191 acard = card->private_data; 192 acard = card->private_data;
@@ -194,7 +195,6 @@ static int snd_card_azt2320_probe(int dev,
194 snd_card_free(card); 195 snd_card_free(card);
195 return error; 196 return error;
196 } 197 }
197 snd_card_set_dev(card, &pcard->card->dev);
198 198
199 if ((error = snd_card_azt2320_enable_wss(port[dev]))) { 199 if ((error = snd_card_azt2320_enable_wss(port[dev]))) {
200 snd_card_free(card); 200 snd_card_free(card);
diff --git a/sound/isa/cmi8328.c b/sound/isa/cmi8328.c
index ab6b2dc043f1..4778852a1201 100644
--- a/sound/isa/cmi8328.c
+++ b/sound/isa/cmi8328.c
@@ -293,15 +293,14 @@ static int snd_cmi8328_probe(struct device *pdev, unsigned int ndev)
293 } 293 }
294 outb(val, port); 294 outb(val, port);
295 295
296 err = snd_card_create(index[ndev], id[ndev], THIS_MODULE, 296 err = snd_card_new(pdev, index[ndev], id[ndev], THIS_MODULE,
297 sizeof(struct snd_cmi8328), &card); 297 sizeof(struct snd_cmi8328), &card);
298 if (err < 0) 298 if (err < 0)
299 return err; 299 return err;
300 cmi = card->private_data; 300 cmi = card->private_data;
301 cmi->card = card; 301 cmi->card = card;
302 cmi->port = port; 302 cmi->port = port;
303 cmi->wss_cfg = val; 303 cmi->wss_cfg = val;
304 snd_card_set_dev(card, pdev);
305 304
306 err = snd_wss_create(card, port + 4, -1, irq[ndev], dma1[ndev], 305 err = snd_wss_create(card, port + 4, -1, irq[ndev], dma1[ndev],
307 dma2[ndev], WSS_HW_DETECT, 0, &cmi->wss); 306 dma2[ndev], WSS_HW_DETECT, 0, &cmi->wss);
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c
index 270b9659ef7f..dfedfd85f205 100644
--- a/sound/isa/cmi8330.c
+++ b/sound/isa/cmi8330.c
@@ -514,14 +514,15 @@ static int snd_cmi8330_resume(struct snd_card *card)
514 514
515#define PFX "cmi8330: " 515#define PFX "cmi8330: "
516 516
517static int snd_cmi8330_card_new(int dev, struct snd_card **cardp) 517static int snd_cmi8330_card_new(struct device *pdev, int dev,
518 struct snd_card **cardp)
518{ 519{
519 struct snd_card *card; 520 struct snd_card *card;
520 struct snd_cmi8330 *acard; 521 struct snd_cmi8330 *acard;
521 int err; 522 int err;
522 523
523 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 524 err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
524 sizeof(struct snd_cmi8330), &card); 525 sizeof(struct snd_cmi8330), &card);
525 if (err < 0) { 526 if (err < 0) {
526 snd_printk(KERN_ERR PFX "could not get a new card\n"); 527 snd_printk(KERN_ERR PFX "could not get a new card\n");
527 return err; 528 return err;
@@ -635,10 +636,9 @@ static int snd_cmi8330_isa_probe(struct device *pdev,
635 struct snd_card *card; 636 struct snd_card *card;
636 int err; 637 int err;
637 638
638 err = snd_cmi8330_card_new(dev, &card); 639 err = snd_cmi8330_card_new(pdev, dev, &card);
639 if (err < 0) 640 if (err < 0)
640 return err; 641 return err;
641 snd_card_set_dev(card, pdev);
642 if ((err = snd_cmi8330_probe(card, dev)) < 0) { 642 if ((err = snd_cmi8330_probe(card, dev)) < 0) {
643 snd_card_free(card); 643 snd_card_free(card);
644 return err; 644 return err;
@@ -698,7 +698,7 @@ static int snd_cmi8330_pnp_detect(struct pnp_card_link *pcard,
698 if (dev >= SNDRV_CARDS) 698 if (dev >= SNDRV_CARDS)
699 return -ENODEV; 699 return -ENODEV;
700 700
701 res = snd_cmi8330_card_new(dev, &card); 701 res = snd_cmi8330_card_new(&pcard->card->dev, dev, &card);
702 if (res < 0) 702 if (res < 0)
703 return res; 703 return res;
704 if ((res = snd_cmi8330_pnp(dev, card->private_data, pcard, pid)) < 0) { 704 if ((res = snd_cmi8330_pnp(dev, card->private_data, pcard, pid)) < 0) {
@@ -706,7 +706,6 @@ static int snd_cmi8330_pnp_detect(struct pnp_card_link *pcard,
706 snd_card_free(card); 706 snd_card_free(card);
707 return res; 707 return res;
708 } 708 }
709 snd_card_set_dev(card, &pcard->card->dev);
710 if ((res = snd_cmi8330_probe(card, dev)) < 0) { 709 if ((res = snd_cmi8330_probe(card, dev)) < 0) {
711 snd_card_free(card); 710 snd_card_free(card);
712 return res; 711 return res;
diff --git a/sound/isa/cs423x/cs4231.c b/sound/isa/cs423x/cs4231.c
index ba9a74eff3e0..7dba07a4343a 100644
--- a/sound/isa/cs423x/cs4231.c
+++ b/sound/isa/cs423x/cs4231.c
@@ -95,7 +95,7 @@ static int snd_cs4231_probe(struct device *dev, unsigned int n)
95 struct snd_pcm *pcm; 95 struct snd_pcm *pcm;
96 int error; 96 int error;
97 97
98 error = snd_card_create(index[n], id[n], THIS_MODULE, 0, &card); 98 error = snd_card_new(dev, index[n], id[n], THIS_MODULE, 0, &card);
99 if (error < 0) 99 if (error < 0)
100 return error; 100 return error;
101 101
@@ -135,8 +135,6 @@ static int snd_cs4231_probe(struct device *dev, unsigned int n)
135 dev_warn(dev, "MPU401 not detected\n"); 135 dev_warn(dev, "MPU401 not detected\n");
136 } 136 }
137 137
138 snd_card_set_dev(card, dev);
139
140 error = snd_card_register(card); 138 error = snd_card_register(card);
141 if (error < 0) 139 if (error < 0)
142 goto out; 140 goto out;
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index 69614acb2052..750f51c904fc 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -364,13 +364,14 @@ static void snd_card_cs4236_free(struct snd_card *card)
364 release_and_free_resource(acard->res_sb_port); 364 release_and_free_resource(acard->res_sb_port);
365} 365}
366 366
367static int snd_cs423x_card_new(int dev, struct snd_card **cardp) 367static int snd_cs423x_card_new(struct device *pdev, int dev,
368 struct snd_card **cardp)
368{ 369{
369 struct snd_card *card; 370 struct snd_card *card;
370 int err; 371 int err;
371 372
372 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 373 err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
373 sizeof(struct snd_card_cs4236), &card); 374 sizeof(struct snd_card_cs4236), &card);
374 if (err < 0) 375 if (err < 0)
375 return err; 376 return err;
376 card->private_free = snd_card_cs4236_free; 377 card->private_free = snd_card_cs4236_free;
@@ -487,10 +488,9 @@ static int snd_cs423x_isa_probe(struct device *pdev,
487 struct snd_card *card; 488 struct snd_card *card;
488 int err; 489 int err;
489 490
490 err = snd_cs423x_card_new(dev, &card); 491 err = snd_cs423x_card_new(pdev, dev, &card);
491 if (err < 0) 492 if (err < 0)
492 return err; 493 return err;
493 snd_card_set_dev(card, pdev);
494 if ((err = snd_cs423x_probe(card, dev)) < 0) { 494 if ((err = snd_cs423x_probe(card, dev)) < 0) {
495 snd_card_free(card); 495 snd_card_free(card);
496 return err; 496 return err;
@@ -577,7 +577,7 @@ static int snd_cs423x_pnpbios_detect(struct pnp_dev *pdev,
577 if (!strcmp(cdev->id[0].id, cid)) 577 if (!strcmp(cdev->id[0].id, cid))
578 break; 578 break;
579 } 579 }
580 err = snd_cs423x_card_new(dev, &card); 580 err = snd_cs423x_card_new(&pdev->dev, dev, &card);
581 if (err < 0) 581 if (err < 0)
582 return err; 582 return err;
583 err = snd_card_cs423x_pnp(dev, card->private_data, pdev, cdev); 583 err = snd_card_cs423x_pnp(dev, card->private_data, pdev, cdev);
@@ -586,7 +586,6 @@ static int snd_cs423x_pnpbios_detect(struct pnp_dev *pdev,
586 snd_card_free(card); 586 snd_card_free(card);
587 return err; 587 return err;
588 } 588 }
589 snd_card_set_dev(card, &pdev->dev);
590 if ((err = snd_cs423x_probe(card, dev)) < 0) { 589 if ((err = snd_cs423x_probe(card, dev)) < 0) {
591 snd_card_free(card); 590 snd_card_free(card);
592 return err; 591 return err;
@@ -638,7 +637,7 @@ static int snd_cs423x_pnpc_detect(struct pnp_card_link *pcard,
638 if (dev >= SNDRV_CARDS) 637 if (dev >= SNDRV_CARDS)
639 return -ENODEV; 638 return -ENODEV;
640 639
641 res = snd_cs423x_card_new(dev, &card); 640 res = snd_cs423x_card_new(&pcard->card->dev, dev, &card);
642 if (res < 0) 641 if (res < 0)
643 return res; 642 return res;
644 if ((res = snd_card_cs423x_pnpc(dev, card->private_data, pcard, pid)) < 0) { 643 if ((res = snd_card_cs423x_pnpc(dev, card->private_data, pcard, pid)) < 0) {
@@ -647,7 +646,6 @@ static int snd_cs423x_pnpc_detect(struct pnp_card_link *pcard,
647 snd_card_free(card); 646 snd_card_free(card);
648 return res; 647 return res;
649 } 648 }
650 snd_card_set_dev(card, &pcard->card->dev);
651 if ((res = snd_cs423x_probe(card, dev)) < 0) { 649 if ((res = snd_cs423x_probe(card, dev)) < 0) {
652 snd_card_free(card); 650 snd_card_free(card);
653 return res; 651 return res;
diff --git a/sound/isa/es1688/es1688.c b/sound/isa/es1688/es1688.c
index cdcfb57f1f0a..76001fe0579d 100644
--- a/sound/isa/es1688/es1688.c
+++ b/sound/isa/es1688/es1688.c
@@ -187,8 +187,8 @@ static int snd_es1688_isa_probe(struct device *dev, unsigned int n)
187 struct snd_card *card; 187 struct snd_card *card;
188 int error; 188 int error;
189 189
190 error = snd_card_create(index[n], id[n], THIS_MODULE, 190 error = snd_card_new(dev, index[n], id[n], THIS_MODULE,
191 sizeof(struct snd_es1688), &card); 191 sizeof(struct snd_es1688), &card);
192 if (error < 0) 192 if (error < 0)
193 return error; 193 return error;
194 194
@@ -196,8 +196,6 @@ static int snd_es1688_isa_probe(struct device *dev, unsigned int n)
196 if (error < 0) 196 if (error < 0)
197 goto out; 197 goto out;
198 198
199 snd_card_set_dev(card, dev);
200
201 error = snd_es1688_probe(card, n); 199 error = snd_es1688_probe(card, n);
202 if (error < 0) 200 if (error < 0)
203 goto out; 201 goto out;
@@ -274,8 +272,9 @@ static int snd_es968_pnp_detect(struct pnp_card_link *pcard,
274 if (dev == SNDRV_CARDS) 272 if (dev == SNDRV_CARDS)
275 return -ENODEV; 273 return -ENODEV;
276 274
277 error = snd_card_create(index[dev], id[dev], THIS_MODULE, 275 error = snd_card_new(&pcard->card->dev,
278 sizeof(struct snd_es1688), &card); 276 index[dev], id[dev], THIS_MODULE,
277 sizeof(struct snd_es1688), &card);
279 if (error < 0) 278 if (error < 0)
280 return error; 279 return error;
281 chip = card->private_data; 280 chip = card->private_data;
@@ -285,7 +284,6 @@ static int snd_es968_pnp_detect(struct pnp_card_link *pcard,
285 snd_card_free(card); 284 snd_card_free(card);
286 return error; 285 return error;
287 } 286 }
288 snd_card_set_dev(card, &pcard->card->dev);
289 error = snd_es1688_probe(card, dev); 287 error = snd_es1688_probe(card, dev);
290 if (error < 0) 288 if (error < 0)
291 return error; 289 return error;
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,
2105#define is_isapnp_selected(dev) 0 2105#define is_isapnp_selected(dev) 0
2106#endif 2106#endif
2107 2107
2108static int snd_es18xx_card_new(int dev, struct snd_card **cardp) 2108static int snd_es18xx_card_new(struct device *pdev, int dev,
2109 struct snd_card **cardp)
2109{ 2110{
2110 return snd_card_create(index[dev], id[dev], THIS_MODULE, 2111 return snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
2111 sizeof(struct snd_es18xx), cardp); 2112 sizeof(struct snd_es18xx), cardp);
2112} 2113}
2113 2114
2114static int snd_audiodrive_probe(struct snd_card *card, int dev) 2115static 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)
2179 struct snd_card *card; 2180 struct snd_card *card;
2180 int err; 2181 int err;
2181 2182
2182 err = snd_es18xx_card_new(dev, &card); 2183 err = snd_es18xx_card_new(devptr, dev, &card);
2183 if (err < 0) 2184 if (err < 0)
2184 return err; 2185 return err;
2185 snd_card_set_dev(card, devptr);
2186 if ((err = snd_audiodrive_probe(card, dev)) < 0) { 2186 if ((err = snd_audiodrive_probe(card, dev)) < 0) {
2187 snd_card_free(card); 2187 snd_card_free(card);
2188 return err; 2188 return err;
@@ -2284,14 +2284,13 @@ static int snd_audiodrive_pnp_detect(struct pnp_dev *pdev,
2284 if (dev >= SNDRV_CARDS) 2284 if (dev >= SNDRV_CARDS)
2285 return -ENODEV; 2285 return -ENODEV;
2286 2286
2287 err = snd_es18xx_card_new(dev, &card); 2287 err = snd_es18xx_card_new(&pdev->dev, dev, &card);
2288 if (err < 0) 2288 if (err < 0)
2289 return err; 2289 return err;
2290 if ((err = snd_audiodrive_pnp(dev, card->private_data, pdev)) < 0) { 2290 if ((err = snd_audiodrive_pnp(dev, card->private_data, pdev)) < 0) {
2291 snd_card_free(card); 2291 snd_card_free(card);
2292 return err; 2292 return err;
2293 } 2293 }
2294 snd_card_set_dev(card, &pdev->dev);
2295 if ((err = snd_audiodrive_probe(card, dev)) < 0) { 2294 if ((err = snd_audiodrive_probe(card, dev)) < 0) {
2296 snd_card_free(card); 2295 snd_card_free(card);
2297 return err; 2296 return err;
@@ -2342,7 +2341,7 @@ static int snd_audiodrive_pnpc_detect(struct pnp_card_link *pcard,
2342 if (dev >= SNDRV_CARDS) 2341 if (dev >= SNDRV_CARDS)
2343 return -ENODEV; 2342 return -ENODEV;
2344 2343
2345 res = snd_es18xx_card_new(dev, &card); 2344 res = snd_es18xx_card_new(&pcard->card->dev, dev, &card);
2346 if (res < 0) 2345 if (res < 0)
2347 return res; 2346 return res;
2348 2347
@@ -2350,7 +2349,6 @@ static int snd_audiodrive_pnpc_detect(struct pnp_card_link *pcard,
2350 snd_card_free(card); 2349 snd_card_free(card);
2351 return res; 2350 return res;
2352 } 2351 }
2353 snd_card_set_dev(card, &pcard->card->dev);
2354 if ((res = snd_audiodrive_probe(card, dev)) < 0) { 2352 if ((res = snd_audiodrive_probe(card, dev)) < 0) {
2355 snd_card_free(card); 2353 snd_card_free(card);
2356 return res; 2354 return res;
diff --git a/sound/isa/galaxy/galaxy.c b/sound/isa/galaxy/galaxy.c
index 81244e7cea5b..1eb2b1ec0fd9 100644
--- a/sound/isa/galaxy/galaxy.c
+++ b/sound/isa/galaxy/galaxy.c
@@ -506,13 +506,11 @@ static int snd_galaxy_probe(struct device *dev, unsigned int n)
506 u8 type; 506 u8 type;
507 int err; 507 int err;
508 508
509 err = snd_card_create(index[n], id[n], THIS_MODULE, sizeof *galaxy, 509 err = snd_card_new(dev, index[n], id[n], THIS_MODULE,
510 &card); 510 sizeof(*galaxy), &card);
511 if (err < 0) 511 if (err < 0)
512 return err; 512 return err;
513 513
514 snd_card_set_dev(card, dev);
515
516 card->private_free = snd_galaxy_free; 514 card->private_free = snd_galaxy_free;
517 galaxy = card->private_data; 515 galaxy = card->private_data;
518 516
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
628static int snd_interwave_card_new(int dev, struct snd_card **cardp) 628static 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;
diff --git a/sound/isa/msnd/msnd_pinnacle.c b/sound/isa/msnd/msnd_pinnacle.c
index 0a90bd6ae232..5016bf957f51 100644
--- a/sound/isa/msnd/msnd_pinnacle.c
+++ b/sound/isa/msnd/msnd_pinnacle.c
@@ -905,12 +905,11 @@ static int snd_msnd_isa_probe(struct device *pdev, unsigned int idx)
905 return -ENODEV; 905 return -ENODEV;
906 } 906 }
907 907
908 err = snd_card_create(index[idx], id[idx], THIS_MODULE, 908 err = snd_card_new(pdev, index[idx], id[idx], THIS_MODULE,
909 sizeof(struct snd_msnd), &card); 909 sizeof(struct snd_msnd), &card);
910 if (err < 0) 910 if (err < 0)
911 return err; 911 return err;
912 912
913 snd_card_set_dev(card, pdev);
914 chip = card->private_data; 913 chip = card->private_data;
915 chip->card = card; 914 chip->card = card;
916 915
@@ -1122,14 +1121,14 @@ static int snd_msnd_pnp_detect(struct pnp_card_link *pcard,
1122 * Create a new ALSA sound card entry, in anticipation 1121 * Create a new ALSA sound card entry, in anticipation
1123 * of detecting our hardware ... 1122 * of detecting our hardware ...
1124 */ 1123 */
1125 ret = snd_card_create(index[idx], id[idx], THIS_MODULE, 1124 ret = snd_card_new(&pcard->card->dev,
1126 sizeof(struct snd_msnd), &card); 1125 index[idx], id[idx], THIS_MODULE,
1126 sizeof(struct snd_msnd), &card);
1127 if (ret < 0) 1127 if (ret < 0)
1128 return ret; 1128 return ret;
1129 1129
1130 chip = card->private_data; 1130 chip = card->private_data;
1131 chip->card = card; 1131 chip->card = card;
1132 snd_card_set_dev(card, &pcard->card->dev);
1133 1132
1134 /* 1133 /*
1135 * Read the correct parameters off the ISA PnP bus ... 1134 * Read the correct parameters off the ISA PnP bus ...
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c
index cc01c419b7e9..a219bc37816b 100644
--- a/sound/isa/opl3sa2.c
+++ b/sound/isa/opl3sa2.c
@@ -627,14 +627,15 @@ static void snd_opl3sa2_free(struct snd_card *card)
627 release_and_free_resource(chip->res_port); 627 release_and_free_resource(chip->res_port);
628} 628}
629 629
630static int snd_opl3sa2_card_new(int dev, struct snd_card **cardp) 630static int snd_opl3sa2_card_new(struct device *pdev, int dev,
631 struct snd_card **cardp)
631{ 632{
632 struct snd_card *card; 633 struct snd_card *card;
633 struct snd_opl3sa2 *chip; 634 struct snd_opl3sa2 *chip;
634 int err; 635 int err;
635 636
636 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 637 err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
637 sizeof(struct snd_opl3sa2), &card); 638 sizeof(struct snd_opl3sa2), &card);
638 if (err < 0) 639 if (err < 0)
639 return err; 640 return err;
640 strcpy(card->driver, "OPL3SA2"); 641 strcpy(card->driver, "OPL3SA2");
@@ -737,14 +738,13 @@ static int snd_opl3sa2_pnp_detect(struct pnp_dev *pdev,
737 if (dev >= SNDRV_CARDS) 738 if (dev >= SNDRV_CARDS)
738 return -ENODEV; 739 return -ENODEV;
739 740
740 err = snd_opl3sa2_card_new(dev, &card); 741 err = snd_opl3sa2_card_new(&pdev->dev, dev, &card);
741 if (err < 0) 742 if (err < 0)
742 return err; 743 return err;
743 if ((err = snd_opl3sa2_pnp(dev, card->private_data, pdev)) < 0) { 744 if ((err = snd_opl3sa2_pnp(dev, card->private_data, pdev)) < 0) {
744 snd_card_free(card); 745 snd_card_free(card);
745 return err; 746 return err;
746 } 747 }
747 snd_card_set_dev(card, &pdev->dev);
748 if ((err = snd_opl3sa2_probe(card, dev)) < 0) { 748 if ((err = snd_opl3sa2_probe(card, dev)) < 0) {
749 snd_card_free(card); 749 snd_card_free(card);
750 return err; 750 return err;
@@ -802,14 +802,13 @@ static int snd_opl3sa2_pnp_cdetect(struct pnp_card_link *pcard,
802 if (dev >= SNDRV_CARDS) 802 if (dev >= SNDRV_CARDS)
803 return -ENODEV; 803 return -ENODEV;
804 804
805 err = snd_opl3sa2_card_new(dev, &card); 805 err = snd_opl3sa2_card_new(&pdev->dev, dev, &card);
806 if (err < 0) 806 if (err < 0)
807 return err; 807 return err;
808 if ((err = snd_opl3sa2_pnp(dev, card->private_data, pdev)) < 0) { 808 if ((err = snd_opl3sa2_pnp(dev, card->private_data, pdev)) < 0) {
809 snd_card_free(card); 809 snd_card_free(card);
810 return err; 810 return err;
811 } 811 }
812 snd_card_set_dev(card, &pdev->dev);
813 if ((err = snd_opl3sa2_probe(card, dev)) < 0) { 812 if ((err = snd_opl3sa2_probe(card, dev)) < 0) {
814 snd_card_free(card); 813 snd_card_free(card);
815 return err; 814 return err;
@@ -883,10 +882,9 @@ static int snd_opl3sa2_isa_probe(struct device *pdev,
883 struct snd_card *card; 882 struct snd_card *card;
884 int err; 883 int err;
885 884
886 err = snd_opl3sa2_card_new(dev, &card); 885 err = snd_opl3sa2_card_new(pdev, dev, &card);
887 if (err < 0) 886 if (err < 0)
888 return err; 887 return err;
889 snd_card_set_dev(card, pdev);
890 if ((err = snd_opl3sa2_probe(card, dev)) < 0) { 888 if ((err = snd_opl3sa2_probe(card, dev)) < 0) {
891 snd_card_free(card); 889 snd_card_free(card);
892 return err; 890 return err;
diff --git a/sound/isa/opti9xx/miro.c b/sound/isa/opti9xx/miro.c
index 619753d96ca5..c2ca681ac51b 100644
--- a/sound/isa/opti9xx/miro.c
+++ b/sound/isa/opti9xx/miro.c
@@ -1411,8 +1411,8 @@ static int snd_miro_isa_probe(struct device *devptr, unsigned int n)
1411 struct snd_miro *miro; 1411 struct snd_miro *miro;
1412 struct snd_card *card; 1412 struct snd_card *card;
1413 1413
1414 error = snd_card_create(index, id, THIS_MODULE, 1414 error = snd_card_new(devptr, index, id, THIS_MODULE,
1415 sizeof(struct snd_miro), &card); 1415 sizeof(struct snd_miro), &card);
1416 if (error < 0) 1416 if (error < 0)
1417 return error; 1417 return error;
1418 1418
@@ -1479,8 +1479,6 @@ static int snd_miro_isa_probe(struct device *devptr, unsigned int n)
1479 } 1479 }
1480 } 1480 }
1481 1481
1482 snd_card_set_dev(card, devptr);
1483
1484 error = snd_miro_probe(card); 1482 error = snd_miro_probe(card);
1485 if (error < 0) { 1483 if (error < 0) {
1486 snd_card_free(card); 1484 snd_card_free(card);
@@ -1584,8 +1582,8 @@ static int snd_miro_pnp_probe(struct pnp_card_link *pcard,
1584 return -EBUSY; 1582 return -EBUSY;
1585 if (!isapnp) 1583 if (!isapnp)
1586 return -ENODEV; 1584 return -ENODEV;
1587 err = snd_card_create(index, id, THIS_MODULE, 1585 err = snd_card_new(&pcard->card->dev, index, id, THIS_MODULE,
1588 sizeof(struct snd_miro), &card); 1586 sizeof(struct snd_miro), &card);
1589 if (err < 0) 1587 if (err < 0)
1590 return err; 1588 return err;
1591 1589
@@ -1612,7 +1610,6 @@ static int snd_miro_pnp_probe(struct pnp_card_link *pcard,
1612 return err; 1610 return err;
1613 } 1611 }
1614 1612
1615 snd_card_set_dev(card, &pcard->card->dev);
1616 err = snd_miro_probe(card); 1613 err = snd_miro_probe(card);
1617 if (err < 0) { 1614 if (err < 0) {
1618 snd_card_free(card); 1615 snd_card_free(card);
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c
index 6effe99bbb9c..c9b582848603 100644
--- a/sound/isa/opti9xx/opti92x-ad1848.c
+++ b/sound/isa/opti9xx/opti92x-ad1848.c
@@ -934,13 +934,13 @@ static int snd_opti9xx_probe(struct snd_card *card)
934 return snd_card_register(card); 934 return snd_card_register(card);
935} 935}
936 936
937static int snd_opti9xx_card_new(struct snd_card **cardp) 937static int snd_opti9xx_card_new(struct device *pdev, struct snd_card **cardp)
938{ 938{
939 struct snd_card *card; 939 struct snd_card *card;
940 int err; 940 int err;
941 941
942 err = snd_card_create(index, id, THIS_MODULE, 942 err = snd_card_new(pdev, index, id, THIS_MODULE,
943 sizeof(struct snd_opti9xx), &card); 943 sizeof(struct snd_opti9xx), &card);
944 if (err < 0) 944 if (err < 0)
945 return err; 945 return err;
946 card->private_free = snd_card_opti9xx_free; 946 card->private_free = snd_card_opti9xx_free;
@@ -1010,7 +1010,7 @@ static int snd_opti9xx_isa_probe(struct device *devptr,
1010 } 1010 }
1011#endif 1011#endif
1012 1012
1013 error = snd_opti9xx_card_new(&card); 1013 error = snd_opti9xx_card_new(devptr, &card);
1014 if (error < 0) 1014 if (error < 0)
1015 return error; 1015 return error;
1016 1016
@@ -1018,7 +1018,6 @@ static int snd_opti9xx_isa_probe(struct device *devptr,
1018 snd_card_free(card); 1018 snd_card_free(card);
1019 return error; 1019 return error;
1020 } 1020 }
1021 snd_card_set_dev(card, devptr);
1022 if ((error = snd_opti9xx_probe(card)) < 0) { 1021 if ((error = snd_opti9xx_probe(card)) < 0) {
1023 snd_card_free(card); 1022 snd_card_free(card);
1024 return error; 1023 return error;
@@ -1100,7 +1099,7 @@ static int snd_opti9xx_pnp_probe(struct pnp_card_link *pcard,
1100 return -EBUSY; 1099 return -EBUSY;
1101 if (! isapnp) 1100 if (! isapnp)
1102 return -ENODEV; 1101 return -ENODEV;
1103 error = snd_opti9xx_card_new(&card); 1102 error = snd_opti9xx_card_new(&pcard->card->dev, &card);
1104 if (error < 0) 1103 if (error < 0)
1105 return error; 1104 return error;
1106 chip = card->private_data; 1105 chip = card->private_data;
@@ -1131,7 +1130,6 @@ static int snd_opti9xx_pnp_probe(struct pnp_card_link *pcard,
1131 snd_card_free(card); 1130 snd_card_free(card);
1132 return error; 1131 return error;
1133 } 1132 }
1134 snd_card_set_dev(card, &pcard->card->dev);
1135 if ((error = snd_opti9xx_probe(card)) < 0) { 1133 if ((error = snd_opti9xx_probe(card)) < 0) {
1136 snd_card_free(card); 1134 snd_card_free(card);
1137 return error; 1135 return error;
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)
229 static int possible_dmas16[] = {5, 7, -1}; 229 static int possible_dmas16[] = {5, 7, -1};
230 int err, xirq, xdma8, xdma16, xmpu_port, xmpu_irq; 230 int err, xirq, xdma8, xdma16, xmpu_port, xmpu_irq;
231 231
232 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 232 err = snd_card_new(devptr, index[dev], id[dev], THIS_MODULE,
233 sizeof(struct snd_card_jazz16), &card); 233 sizeof(struct snd_card_jazz16), &card);
234 if (err < 0) 234 if (err < 0)
235 return err; 235 return err;
236 236
@@ -327,8 +327,6 @@ static int snd_jazz16_probe(struct device *devptr, unsigned int dev)
327 mpu_port[dev]); 327 mpu_port[dev]);
328 } 328 }
329 329
330 snd_card_set_dev(card, devptr);
331
332 err = snd_card_register(card); 330 err = snd_card_register(card);
333 if (err < 0) 331 if (err < 0)
334 goto err_free; 332 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)
323#define is_isapnp_selected(dev) 0 323#define is_isapnp_selected(dev) 0
324#endif 324#endif
325 325
326static int snd_sb16_card_new(int dev, struct snd_card **cardp) 326static int snd_sb16_card_new(struct device *devptr, int dev,
327 struct snd_card **cardp)
327{ 328{
328 struct snd_card *card; 329 struct snd_card *card;
329 int err; 330 int err;
330 331
331 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 332 err = snd_card_new(devptr, index[dev], id[dev], THIS_MODULE,
332 sizeof(struct snd_card_sb16), &card); 333 sizeof(struct snd_card_sb16), &card);
333 if (err < 0) 334 if (err < 0)
334 return err; 335 return err;
335 card->private_free = snd_sb16_free; 336 card->private_free = snd_sb16_free;
@@ -493,7 +494,7 @@ static int snd_sb16_isa_probe1(int dev, struct device *pdev)
493 struct snd_card *card; 494 struct snd_card *card;
494 int err; 495 int err;
495 496
496 err = snd_sb16_card_new(dev, &card); 497 err = snd_sb16_card_new(pdev, dev, &card);
497 if (err < 0) 498 if (err < 0)
498 return err; 499 return err;
499 500
@@ -507,7 +508,6 @@ static int snd_sb16_isa_probe1(int dev, struct device *pdev)
507 awe_port[dev] = port[dev] + 0x400; 508 awe_port[dev] = port[dev] + 0x400;
508#endif 509#endif
509 510
510 snd_card_set_dev(card, pdev);
511 if ((err = snd_sb16_probe(card, dev)) < 0) { 511 if ((err = snd_sb16_probe(card, dev)) < 0) {
512 snd_card_free(card); 512 snd_card_free(card);
513 return err; 513 return err;
@@ -613,10 +613,9 @@ static int snd_sb16_pnp_detect(struct pnp_card_link *pcard,
613 for ( ; dev < SNDRV_CARDS; dev++) { 613 for ( ; dev < SNDRV_CARDS; dev++) {
614 if (!enable[dev] || !isapnp[dev]) 614 if (!enable[dev] || !isapnp[dev])
615 continue; 615 continue;
616 res = snd_sb16_card_new(dev, &card); 616 res = snd_sb16_card_new(&pcard->card->dev, dev, &card);
617 if (res < 0) 617 if (res < 0)
618 return res; 618 return res;
619 snd_card_set_dev(card, &pcard->card->dev);
620 if ((res = snd_card_sb16_pnp(dev, card->private_data, pcard, pid)) < 0 || 619 if ((res = snd_card_sb16_pnp(dev, card->private_data, pcard, pid)) < 0 ||
621 (res = snd_sb16_probe(card, dev)) < 0) { 620 (res = snd_sb16_probe(card, dev)) < 0) {
622 snd_card_free(card); 621 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)
102 struct snd_opl3 *opl3; 102 struct snd_opl3 *opl3;
103 int err; 103 int err;
104 104
105 err = snd_card_create(index[dev], id[dev], THIS_MODULE, 105 err = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
106 sizeof(struct snd_sb8), &card); 106 sizeof(struct snd_sb8), &card);
107 if (err < 0) 107 if (err < 0)
108 return err; 108 return err;
109 acard = card->private_data; 109 acard = card->private_data;
@@ -192,8 +192,6 @@ static int snd_sb8_probe(struct device *pdev, unsigned int dev)
192 chip->port, 192 chip->port,
193 irq[dev], dma8[dev]); 193 irq[dev], dma8[dev]);
194 194
195 snd_card_set_dev(card, pdev);
196
197 if ((err = snd_card_register(card)) < 0) 195 if ((err = snd_card_register(card)) < 0)
198 goto _err; 196 goto _err;
199 197
diff --git a/sound/isa/sc6000.c b/sound/isa/sc6000.c
index 09d481b3ba7f..15a152eaa2e8 100644
--- a/sound/isa/sc6000.c
+++ b/sound/isa/sc6000.c
@@ -559,8 +559,8 @@ static int snd_sc6000_probe(struct device *devptr, unsigned int dev)
559 char __iomem *vmss_port; 559 char __iomem *vmss_port;
560 560
561 561
562 err = snd_card_create(index[dev], id[dev], THIS_MODULE, sizeof(vport), 562 err = snd_card_new(devptr, index[dev], id[dev], THIS_MODULE,
563 &card); 563 sizeof(vport), &card);
564 if (err < 0) 564 if (err < 0)
565 return err; 565 return err;
566 566
@@ -668,8 +668,6 @@ static int snd_sc6000_probe(struct device *devptr, unsigned int dev)
668 sprintf(card->longname, "Gallant SC-6000 at 0x%lx, irq %d, dma %d", 668 sprintf(card->longname, "Gallant SC-6000 at 0x%lx, irq %d, dma %d",
669 mss_port[dev], xirq, xdma); 669 mss_port[dev], xirq, xdma);
670 670
671 snd_card_set_dev(card, devptr);
672
673 err = snd_card_register(card); 671 err = snd_card_register(card);
674 if (err < 0) 672 if (err < 0)
675 goto err_unmap2; 673 goto err_unmap2;
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c
index 57b338973ede..44405df7d4be 100644
--- a/sound/isa/sscape.c
+++ b/sound/isa/sscape.c
@@ -1169,8 +1169,8 @@ static int snd_sscape_probe(struct device *pdev, unsigned int dev)
1169 struct soundscape *sscape; 1169 struct soundscape *sscape;
1170 int ret; 1170 int ret;
1171 1171
1172 ret = snd_card_create(index[dev], id[dev], THIS_MODULE, 1172 ret = snd_card_new(pdev, index[dev], id[dev], THIS_MODULE,
1173 sizeof(struct soundscape), &card); 1173 sizeof(struct soundscape), &card);
1174 if (ret < 0) 1174 if (ret < 0)
1175 return ret; 1175 return ret;
1176 1176
@@ -1178,7 +1178,6 @@ static int snd_sscape_probe(struct device *pdev, unsigned int dev)
1178 sscape->type = SSCAPE; 1178 sscape->type = SSCAPE;
1179 1179
1180 dma[dev] &= 0x03; 1180 dma[dev] &= 0x03;
1181 snd_card_set_dev(card, pdev);
1182 1181
1183 ret = create_sscape(dev, card); 1182 ret = create_sscape(dev, card);
1184 if (ret < 0) 1183 if (ret < 0)
@@ -1259,8 +1258,9 @@ static int sscape_pnp_detect(struct pnp_card_link *pcard,
1259 * Create a new ALSA sound card entry, in anticipation 1258 * Create a new ALSA sound card entry, in anticipation
1260 * of detecting our hardware ... 1259 * of detecting our hardware ...
1261 */ 1260 */
1262 ret = snd_card_create(index[idx], id[idx], THIS_MODULE, 1261 ret = snd_card_new(&pcard->card->dev,
1263 sizeof(struct soundscape), &card); 1262 index[idx], id[idx], THIS_MODULE,
1263 sizeof(struct soundscape), &card);
1264 if (ret < 0) 1264 if (ret < 0)
1265 return ret; 1265 return ret;
1266 1266
@@ -1288,7 +1288,6 @@ static int sscape_pnp_detect(struct pnp_card_link *pcard,
1288 wss_port[idx] = pnp_port_start(dev, 1); 1288 wss_port[idx] = pnp_port_start(dev, 1);
1289 dma2[idx] = pnp_dma(dev, 1); 1289 dma2[idx] = pnp_dma(dev, 1);
1290 } 1290 }
1291 snd_card_set_dev(card, &pcard->card->dev);
1292 1291
1293 ret = create_sscape(idx, card); 1292 ret = create_sscape(idx, card);
1294 if (ret < 0) 1293 if (ret < 0)
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;