diff options
56 files changed, 98 insertions, 156 deletions
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c index b680d03e2419..ba4da1ed0444 100644 --- a/sound/pci/ad1889.c +++ b/sound/pci/ad1889.c | |||
@@ -965,8 +965,6 @@ snd_ad1889_create(struct snd_card *card, | |||
965 | return err; | 965 | return err; |
966 | } | 966 | } |
967 | 967 | ||
968 | snd_card_set_dev(card, &pci->dev); | ||
969 | |||
970 | *rchip = chip; | 968 | *rchip = chip; |
971 | 969 | ||
972 | return 0; | 970 | return 0; |
@@ -996,7 +994,8 @@ snd_ad1889_probe(struct pci_dev *pci, | |||
996 | } | 994 | } |
997 | 995 | ||
998 | /* (2) */ | 996 | /* (2) */ |
999 | err = snd_card_create(index[devno], id[devno], THIS_MODULE, 0, &card); | 997 | err = snd_card_new(&pci->dev, index[devno], id[devno], THIS_MODULE, |
998 | 0, &card); | ||
1000 | /* XXX REVISIT: we can probably allocate chip in this call */ | 999 | /* XXX REVISIT: we can probably allocate chip in this call */ |
1001 | if (err < 0) | 1000 | if (err < 0) |
1002 | return err; | 1001 | return err; |
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c index c6835a3d64fb..115b1120319a 100644 --- a/sound/pci/ali5451/ali5451.c +++ b/sound/pci/ali5451/ali5451.c | |||
@@ -2218,8 +2218,6 @@ static int snd_ali_create(struct snd_card *card, | |||
2218 | return err; | 2218 | return err; |
2219 | } | 2219 | } |
2220 | 2220 | ||
2221 | snd_card_set_dev(card, &pci->dev); | ||
2222 | |||
2223 | /* initialise synth voices*/ | 2221 | /* initialise synth voices*/ |
2224 | for (i = 0; i < ALI_CHANNELS; i++) | 2222 | for (i = 0; i < ALI_CHANNELS; i++) |
2225 | codec->synth.voices[i].number = i; | 2223 | codec->synth.voices[i].number = i; |
@@ -2253,7 +2251,7 @@ static int snd_ali_probe(struct pci_dev *pci, | |||
2253 | 2251 | ||
2254 | snd_ali_printk("probe ...\n"); | 2252 | snd_ali_printk("probe ...\n"); |
2255 | 2253 | ||
2256 | err = snd_card_create(index, id, THIS_MODULE, 0, &card); | 2254 | err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card); |
2257 | if (err < 0) | 2255 | if (err < 0) |
2258 | return err; | 2256 | return err; |
2259 | 2257 | ||
diff --git a/sound/pci/als300.c b/sound/pci/als300.c index 591efb6eef05..9acd88ab93a4 100644 --- a/sound/pci/als300.c +++ b/sound/pci/als300.c | |||
@@ -761,8 +761,6 @@ static int snd_als300_create(struct snd_card *card, | |||
761 | return err; | 761 | return err; |
762 | } | 762 | } |
763 | 763 | ||
764 | snd_card_set_dev(card, &pci->dev); | ||
765 | |||
766 | *rchip = chip; | 764 | *rchip = chip; |
767 | snd_als300_dbgcallleave(); | 765 | snd_als300_dbgcallleave(); |
768 | return 0; | 766 | return 0; |
@@ -829,7 +827,8 @@ static int snd_als300_probe(struct pci_dev *pci, | |||
829 | return -ENOENT; | 827 | return -ENOENT; |
830 | } | 828 | } |
831 | 829 | ||
832 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 830 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
831 | 0, &card); | ||
833 | 832 | ||
834 | if (err < 0) | 833 | if (err < 0) |
835 | return err; | 834 | return err; |
diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c index ffc821b0139e..2b2bb0fa3bc7 100644 --- a/sound/pci/als4000.c +++ b/sound/pci/als4000.c | |||
@@ -888,9 +888,9 @@ static int snd_card_als4000_probe(struct pci_dev *pci, | |||
888 | pci_write_config_word(pci, PCI_COMMAND, word | PCI_COMMAND_IO); | 888 | pci_write_config_word(pci, PCI_COMMAND, word | PCI_COMMAND_IO); |
889 | pci_set_master(pci); | 889 | pci_set_master(pci); |
890 | 890 | ||
891 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, | 891 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
892 | sizeof(*acard) /* private_data: acard */, | 892 | sizeof(*acard) /* private_data: acard */, |
893 | &card); | 893 | &card); |
894 | if (err < 0) { | 894 | if (err < 0) { |
895 | pci_release_regions(pci); | 895 | pci_release_regions(pci); |
896 | pci_disable_device(pci); | 896 | pci_disable_device(pci); |
@@ -920,7 +920,6 @@ static int snd_card_als4000_probe(struct pci_dev *pci, | |||
920 | 920 | ||
921 | chip->pci = pci; | 921 | chip->pci = pci; |
922 | chip->alt_port = iobase; | 922 | chip->alt_port = iobase; |
923 | snd_card_set_dev(card, &pci->dev); | ||
924 | 923 | ||
925 | snd_als4000_configure(chip); | 924 | snd_als4000_configure(chip); |
926 | 925 | ||
diff --git a/sound/pci/asihpi/asihpi.c b/sound/pci/asihpi/asihpi.c index 5f2acd35dcb9..e4e42f28177d 100644 --- a/sound/pci/asihpi/asihpi.c +++ b/sound/pci/asihpi/asihpi.c | |||
@@ -2827,17 +2827,13 @@ static int snd_asihpi_probe(struct pci_dev *pci_dev, | |||
2827 | hpi = pci_get_drvdata(pci_dev); | 2827 | hpi = pci_get_drvdata(pci_dev); |
2828 | adapter_index = hpi->adapter->index; | 2828 | adapter_index = hpi->adapter->index; |
2829 | /* first try to give the card the same index as its hardware index */ | 2829 | /* first try to give the card the same index as its hardware index */ |
2830 | err = snd_card_create(adapter_index, | 2830 | err = snd_card_new(&pci_dev->dev, adapter_index, id[adapter_index], |
2831 | id[adapter_index], THIS_MODULE, | 2831 | THIS_MODULE, sizeof(struct snd_card_asihpi), &card); |
2832 | sizeof(struct snd_card_asihpi), | ||
2833 | &card); | ||
2834 | if (err < 0) { | 2832 | if (err < 0) { |
2835 | /* if that fails, try the default index==next available */ | 2833 | /* if that fails, try the default index==next available */ |
2836 | err = | 2834 | err = snd_card_new(&pci_dev->dev, index[dev], id[dev], |
2837 | snd_card_create(index[dev], id[dev], | 2835 | THIS_MODULE, sizeof(struct snd_card_asihpi), |
2838 | THIS_MODULE, | 2836 | &card); |
2839 | sizeof(struct snd_card_asihpi), | ||
2840 | &card); | ||
2841 | if (err < 0) | 2837 | if (err < 0) |
2842 | return err; | 2838 | return err; |
2843 | snd_printk(KERN_WARNING | 2839 | snd_printk(KERN_WARNING |
@@ -2845,8 +2841,6 @@ static int snd_asihpi_probe(struct pci_dev *pci_dev, | |||
2845 | adapter_index, card->number); | 2841 | adapter_index, card->number); |
2846 | } | 2842 | } |
2847 | 2843 | ||
2848 | snd_card_set_dev(card, &pci_dev->dev); | ||
2849 | |||
2850 | asihpi = card->private_data; | 2844 | asihpi = card->private_data; |
2851 | asihpi->card = card; | 2845 | asihpi->card = card; |
2852 | asihpi->pci = pci_dev; | 2846 | asihpi->pci = pci_dev; |
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index f6dec3ea371f..85f893b5cc99 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -1657,8 +1657,6 @@ static int snd_atiixp_create(struct snd_card *card, | |||
1657 | return err; | 1657 | return err; |
1658 | } | 1658 | } |
1659 | 1659 | ||
1660 | snd_card_set_dev(card, &pci->dev); | ||
1661 | |||
1662 | *r_chip = chip; | 1660 | *r_chip = chip; |
1663 | return 0; | 1661 | return 0; |
1664 | } | 1662 | } |
@@ -1671,7 +1669,7 @@ static int snd_atiixp_probe(struct pci_dev *pci, | |||
1671 | struct atiixp *chip; | 1669 | struct atiixp *chip; |
1672 | int err; | 1670 | int err; |
1673 | 1671 | ||
1674 | err = snd_card_create(index, id, THIS_MODULE, 0, &card); | 1672 | err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card); |
1675 | if (err < 0) | 1673 | if (err < 0) |
1676 | return err; | 1674 | return err; |
1677 | 1675 | ||
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index 289563ecb6dd..2b3244a85cf8 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c | |||
@@ -1282,8 +1282,6 @@ static int snd_atiixp_create(struct snd_card *card, | |||
1282 | return err; | 1282 | return err; |
1283 | } | 1283 | } |
1284 | 1284 | ||
1285 | snd_card_set_dev(card, &pci->dev); | ||
1286 | |||
1287 | *r_chip = chip; | 1285 | *r_chip = chip; |
1288 | return 0; | 1286 | return 0; |
1289 | } | 1287 | } |
@@ -1296,7 +1294,7 @@ static int snd_atiixp_probe(struct pci_dev *pci, | |||
1296 | struct atiixp_modem *chip; | 1294 | struct atiixp_modem *chip; |
1297 | int err; | 1295 | int err; |
1298 | 1296 | ||
1299 | err = snd_card_create(index, id, THIS_MODULE, 0, &card); | 1297 | err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card); |
1300 | if (err < 0) | 1298 | if (err < 0) |
1301 | return err; | 1299 | return err; |
1302 | 1300 | ||
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c index 7059dd69e5e6..afb1b44b741e 100644 --- a/sound/pci/au88x0/au88x0.c +++ b/sound/pci/au88x0/au88x0.c | |||
@@ -211,8 +211,6 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip) | |||
211 | goto alloc_out; | 211 | goto alloc_out; |
212 | } | 212 | } |
213 | 213 | ||
214 | snd_card_set_dev(card, &pci->dev); | ||
215 | |||
216 | *rchip = chip; | 214 | *rchip = chip; |
217 | 215 | ||
218 | return 0; | 216 | return 0; |
@@ -250,7 +248,8 @@ snd_vortex_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | |||
250 | return -ENOENT; | 248 | return -ENOENT; |
251 | } | 249 | } |
252 | // (2) | 250 | // (2) |
253 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 251 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
252 | 0, &card); | ||
254 | if (err < 0) | 253 | if (err < 0) |
255 | return err; | 254 | return err; |
256 | 255 | ||
diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c index 2925220d3fcf..e9dabee42805 100644 --- a/sound/pci/aw2/aw2-alsa.c +++ b/sound/pci/aw2/aw2-alsa.c | |||
@@ -322,7 +322,6 @@ static int snd_aw2_create(struct snd_card *card, | |||
322 | return err; | 322 | return err; |
323 | } | 323 | } |
324 | 324 | ||
325 | snd_card_set_dev(card, &pci->dev); | ||
326 | *rchip = chip; | 325 | *rchip = chip; |
327 | 326 | ||
328 | printk(KERN_INFO | 327 | printk(KERN_INFO |
@@ -349,7 +348,8 @@ static int snd_aw2_probe(struct pci_dev *pci, | |||
349 | } | 348 | } |
350 | 349 | ||
351 | /* (2) Create card instance */ | 350 | /* (2) Create card instance */ |
352 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 351 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
352 | 0, &card); | ||
353 | if (err < 0) | 353 | if (err < 0) |
354 | return err; | 354 | return err; |
355 | 355 | ||
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c index 1aef7128f7ca..641c235ab4d8 100644 --- a/sound/pci/azt3328.c +++ b/sound/pci/azt3328.c | |||
@@ -2599,8 +2599,6 @@ snd_azf3328_create(struct snd_card *card, | |||
2599 | spin_unlock_irq(codec->lock); | 2599 | spin_unlock_irq(codec->lock); |
2600 | } | 2600 | } |
2601 | 2601 | ||
2602 | snd_card_set_dev(card, &pci->dev); | ||
2603 | |||
2604 | *rchip = chip; | 2602 | *rchip = chip; |
2605 | 2603 | ||
2606 | err = 0; | 2604 | err = 0; |
@@ -2635,7 +2633,8 @@ snd_azf3328_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | |||
2635 | goto out; | 2633 | goto out; |
2636 | } | 2634 | } |
2637 | 2635 | ||
2638 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 2636 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
2637 | 0, &card); | ||
2639 | if (err < 0) | 2638 | if (err < 0) |
2640 | goto out; | 2639 | goto out; |
2641 | 2640 | ||
diff --git a/sound/pci/bt87x.c b/sound/pci/bt87x.c index 18802039497a..06dc7d97cc0c 100644 --- a/sound/pci/bt87x.c +++ b/sound/pci/bt87x.c | |||
@@ -773,7 +773,6 @@ static int snd_bt87x_create(struct snd_card *card, | |||
773 | if (err < 0) | 773 | if (err < 0) |
774 | goto fail; | 774 | goto fail; |
775 | 775 | ||
776 | snd_card_set_dev(card, &pci->dev); | ||
777 | *rchip = chip; | 776 | *rchip = chip; |
778 | return 0; | 777 | return 0; |
779 | 778 | ||
@@ -888,7 +887,8 @@ static int snd_bt87x_probe(struct pci_dev *pci, | |||
888 | return -ENOENT; | 887 | return -ENOENT; |
889 | } | 888 | } |
890 | 889 | ||
891 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 890 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
891 | 0, &card); | ||
892 | if (err < 0) | 892 | if (err < 0) |
893 | return err; | 893 | return err; |
894 | 894 | ||
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index f4db5587e86e..f659c7a89c0c 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -1843,7 +1843,8 @@ static int snd_ca0106_probe(struct pci_dev *pci, | |||
1843 | return -ENOENT; | 1843 | return -ENOENT; |
1844 | } | 1844 | } |
1845 | 1845 | ||
1846 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 1846 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
1847 | 0, &card); | ||
1847 | if (err < 0) | 1848 | if (err < 0) |
1848 | return err; | 1849 | return err; |
1849 | 1850 | ||
@@ -1878,8 +1879,6 @@ static int snd_ca0106_probe(struct pci_dev *pci, | |||
1878 | snd_ca0106_proc_init(chip); | 1879 | snd_ca0106_proc_init(chip); |
1879 | #endif | 1880 | #endif |
1880 | 1881 | ||
1881 | snd_card_set_dev(card, &pci->dev); | ||
1882 | |||
1883 | err = snd_card_register(card); | 1882 | err = snd_card_register(card); |
1884 | if (err < 0) | 1883 | if (err < 0) |
1885 | goto error; | 1884 | goto error; |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 2755ec5bcc25..66c0558ce449 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -3254,8 +3254,6 @@ static int snd_cmipci_create(struct snd_card *card, struct pci_dev *pci, | |||
3254 | if (snd_cmipci_create_gameport(cm, dev) < 0) | 3254 | if (snd_cmipci_create_gameport(cm, dev) < 0) |
3255 | snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN); | 3255 | snd_cmipci_clear_bit(cm, CM_REG_FUNCTRL1, CM_JYSTK_EN); |
3256 | 3256 | ||
3257 | snd_card_set_dev(card, &pci->dev); | ||
3258 | |||
3259 | *rcmipci = cm; | 3257 | *rcmipci = cm; |
3260 | return 0; | 3258 | return 0; |
3261 | } | 3259 | } |
@@ -3280,7 +3278,8 @@ static int snd_cmipci_probe(struct pci_dev *pci, | |||
3280 | return -ENOENT; | 3278 | return -ENOENT; |
3281 | } | 3279 | } |
3282 | 3280 | ||
3283 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 3281 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
3282 | 0, &card); | ||
3284 | if (err < 0) | 3283 | if (err < 0) |
3285 | return err; | 3284 | return err; |
3286 | 3285 | ||
diff --git a/sound/pci/cs4281.c b/sound/pci/cs4281.c index 1dc793e742d7..2bd55177b1ae 100644 --- a/sound/pci/cs4281.c +++ b/sound/pci/cs4281.c | |||
@@ -1402,8 +1402,6 @@ static int snd_cs4281_create(struct snd_card *card, | |||
1402 | 1402 | ||
1403 | snd_cs4281_proc_init(chip); | 1403 | snd_cs4281_proc_init(chip); |
1404 | 1404 | ||
1405 | snd_card_set_dev(card, &pci->dev); | ||
1406 | |||
1407 | *rchip = chip; | 1405 | *rchip = chip; |
1408 | return 0; | 1406 | return 0; |
1409 | } | 1407 | } |
@@ -1917,7 +1915,8 @@ static int snd_cs4281_probe(struct pci_dev *pci, | |||
1917 | return -ENOENT; | 1915 | return -ENOENT; |
1918 | } | 1916 | } |
1919 | 1917 | ||
1920 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 1918 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
1919 | 0, &card); | ||
1921 | if (err < 0) | 1920 | if (err < 0) |
1922 | return err; | 1921 | return err; |
1923 | 1922 | ||
diff --git a/sound/pci/cs46xx/cs46xx.c b/sound/pci/cs46xx/cs46xx.c index b03498325d66..af0eacbc8bd2 100644 --- a/sound/pci/cs46xx/cs46xx.c +++ b/sound/pci/cs46xx/cs46xx.c | |||
@@ -88,7 +88,8 @@ static int snd_card_cs46xx_probe(struct pci_dev *pci, | |||
88 | return -ENOENT; | 88 | return -ENOENT; |
89 | } | 89 | } |
90 | 90 | ||
91 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 91 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
92 | 0, &card); | ||
92 | if (err < 0) | 93 | if (err < 0) |
93 | return err; | 94 | return err; |
94 | if ((err = snd_cs46xx_create(card, pci, | 95 | if ((err = snd_cs46xx_create(card, pci, |
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 062398ec5335..28766478f81c 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c | |||
@@ -4058,8 +4058,6 @@ int snd_cs46xx_create(struct snd_card *card, | |||
4058 | 4058 | ||
4059 | chip->active_ctrl(chip, -1); /* disable CLKRUN */ | 4059 | chip->active_ctrl(chip, -1); /* disable CLKRUN */ |
4060 | 4060 | ||
4061 | snd_card_set_dev(card, &pci->dev); | ||
4062 | |||
4063 | *rchip = chip; | 4061 | *rchip = chip; |
4064 | return 0; | 4062 | return 0; |
4065 | } | 4063 | } |
diff --git a/sound/pci/cs5530.c b/sound/pci/cs5530.c index c6b82c85e044..8037e8600a72 100644 --- a/sound/pci/cs5530.c +++ b/sound/pci/cs5530.c | |||
@@ -244,7 +244,6 @@ static int snd_cs5530_create(struct snd_card *card, | |||
244 | return err; | 244 | return err; |
245 | } | 245 | } |
246 | 246 | ||
247 | snd_card_set_dev(card, &pci->dev); | ||
248 | *rchip = chip; | 247 | *rchip = chip; |
249 | return 0; | 248 | return 0; |
250 | } | 249 | } |
@@ -264,7 +263,8 @@ static int snd_cs5530_probe(struct pci_dev *pci, | |||
264 | return -ENOENT; | 263 | return -ENOENT; |
265 | } | 264 | } |
266 | 265 | ||
267 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 266 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
267 | 0, &card); | ||
268 | 268 | ||
269 | if (err < 0) | 269 | if (err < 0) |
270 | return err; | 270 | return err; |
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c index c0d2835344da..051b3e28e341 100644 --- a/sound/pci/cs5535audio/cs5535audio.c +++ b/sound/pci/cs5535audio/cs5535audio.c | |||
@@ -324,8 +324,6 @@ static int snd_cs5535audio_create(struct snd_card *card, | |||
324 | cs5535au, &ops)) < 0) | 324 | cs5535au, &ops)) < 0) |
325 | goto sndfail; | 325 | goto sndfail; |
326 | 326 | ||
327 | snd_card_set_dev(card, &pci->dev); | ||
328 | |||
329 | *rcs5535au = cs5535au; | 327 | *rcs5535au = cs5535au; |
330 | return 0; | 328 | return 0; |
331 | 329 | ||
@@ -353,7 +351,8 @@ static int snd_cs5535audio_probe(struct pci_dev *pci, | |||
353 | return -ENOENT; | 351 | return -ENOENT; |
354 | } | 352 | } |
355 | 353 | ||
356 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 354 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
355 | 0, &card); | ||
357 | if (err < 0) | 356 | if (err < 0) |
358 | return err; | 357 | return err; |
359 | 358 | ||
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c index eb86829529eb..af632bd08323 100644 --- a/sound/pci/ctxfi/ctatc.c +++ b/sound/pci/ctxfi/ctatc.c | |||
@@ -1739,8 +1739,6 @@ int ct_atc_create(struct snd_card *card, struct pci_dev *pci, | |||
1739 | if (err < 0) | 1739 | if (err < 0) |
1740 | goto error1; | 1740 | goto error1; |
1741 | 1741 | ||
1742 | snd_card_set_dev(card, &pci->dev); | ||
1743 | |||
1744 | *ratc = atc; | 1742 | *ratc = atc; |
1745 | return 0; | 1743 | return 0; |
1746 | 1744 | ||
diff --git a/sound/pci/ctxfi/xfi.c b/sound/pci/ctxfi/xfi.c index d464ad2fc7b7..98426d09c8bd 100644 --- a/sound/pci/ctxfi/xfi.c +++ b/sound/pci/ctxfi/xfi.c | |||
@@ -71,7 +71,8 @@ ct_card_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | |||
71 | dev++; | 71 | dev++; |
72 | return -ENOENT; | 72 | return -ENOENT; |
73 | } | 73 | } |
74 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 74 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
75 | 0, &card); | ||
75 | if (err) | 76 | if (err) |
76 | return err; | 77 | return err; |
77 | if ((reference_rate != 48000) && (reference_rate != 44100)) { | 78 | if ((reference_rate != 48000) && (reference_rate != 44100)) { |
diff --git a/sound/pci/echoaudio/echoaudio.c b/sound/pci/echoaudio/echoaudio.c index 05cfe551ce42..1ef77c0d39ec 100644 --- a/sound/pci/echoaudio/echoaudio.c +++ b/sound/pci/echoaudio/echoaudio.c | |||
@@ -2058,12 +2058,11 @@ static int snd_echo_probe(struct pci_dev *pci, | |||
2058 | 2058 | ||
2059 | DE_INIT(("Echoaudio driver starting...\n")); | 2059 | DE_INIT(("Echoaudio driver starting...\n")); |
2060 | i = 0; | 2060 | i = 0; |
2061 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 2061 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
2062 | 0, &card); | ||
2062 | if (err < 0) | 2063 | if (err < 0) |
2063 | return err; | 2064 | return err; |
2064 | 2065 | ||
2065 | snd_card_set_dev(card, &pci->dev); | ||
2066 | |||
2067 | chip = NULL; /* Tells snd_echo_create to allocate chip */ | 2066 | chip = NULL; /* Tells snd_echo_create to allocate chip */ |
2068 | if ((err = snd_echo_create(card, pci, &chip)) < 0) { | 2067 | if ((err = snd_echo_create(card, pci, &chip)) < 0) { |
2069 | snd_card_free(card); | 2068 | snd_card_free(card); |
diff --git a/sound/pci/emu10k1/emu10k1.c b/sound/pci/emu10k1/emu10k1.c index 9e1bd0c39a8c..5c0413b40dc3 100644 --- a/sound/pci/emu10k1/emu10k1.c +++ b/sound/pci/emu10k1/emu10k1.c | |||
@@ -117,7 +117,8 @@ static int snd_card_emu10k1_probe(struct pci_dev *pci, | |||
117 | return -ENOENT; | 117 | return -ENOENT; |
118 | } | 118 | } |
119 | 119 | ||
120 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 120 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
121 | 0, &card); | ||
121 | if (err < 0) | 122 | if (err < 0) |
122 | return err; | 123 | return err; |
123 | if (max_buffer_size[dev] < 32) | 124 | if (max_buffer_size[dev] < 32) |
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index bdd888ec9a84..75504da63613 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c | |||
@@ -2021,7 +2021,6 @@ int snd_emu10k1_create(struct snd_card *card, | |||
2021 | snd_emu10k1_proc_init(emu); | 2021 | snd_emu10k1_proc_init(emu); |
2022 | #endif | 2022 | #endif |
2023 | 2023 | ||
2024 | snd_card_set_dev(card, &pci->dev); | ||
2025 | *remu = emu; | 2024 | *remu = emu; |
2026 | return 0; | 2025 | return 0; |
2027 | 2026 | ||
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 56ad9d6f200d..3988eaa778cf 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c | |||
@@ -1564,7 +1564,8 @@ static int snd_emu10k1x_probe(struct pci_dev *pci, | |||
1564 | return -ENOENT; | 1564 | return -ENOENT; |
1565 | } | 1565 | } |
1566 | 1566 | ||
1567 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 1567 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
1568 | 0, &card); | ||
1568 | if (err < 0) | 1569 | if (err < 0) |
1569 | return err; | 1570 | return err; |
1570 | 1571 | ||
@@ -1608,8 +1609,6 @@ static int snd_emu10k1x_probe(struct pci_dev *pci, | |||
1608 | sprintf(card->longname, "%s at 0x%lx irq %i", | 1609 | sprintf(card->longname, "%s at 0x%lx irq %i", |
1609 | card->shortname, chip->port, chip->irq); | 1610 | card->shortname, chip->port, chip->irq); |
1610 | 1611 | ||
1611 | snd_card_set_dev(card, &pci->dev); | ||
1612 | |||
1613 | if ((err = snd_card_register(card)) < 0) { | 1612 | if ((err = snd_card_register(card)) < 0) { |
1614 | snd_card_free(card); | 1613 | snd_card_free(card); |
1615 | return err; | 1614 | return err; |
diff --git a/sound/pci/ens1370.c b/sound/pci/ens1370.c index 61262f396004..0f89d2a2090e 100644 --- a/sound/pci/ens1370.c +++ b/sound/pci/ens1370.c | |||
@@ -2180,8 +2180,6 @@ static int snd_ensoniq_create(struct snd_card *card, | |||
2180 | 2180 | ||
2181 | snd_ensoniq_proc_init(ensoniq); | 2181 | snd_ensoniq_proc_init(ensoniq); |
2182 | 2182 | ||
2183 | snd_card_set_dev(card, &pci->dev); | ||
2184 | |||
2185 | *rensoniq = ensoniq; | 2183 | *rensoniq = ensoniq; |
2186 | return 0; | 2184 | return 0; |
2187 | } | 2185 | } |
@@ -2437,7 +2435,8 @@ static int snd_audiopci_probe(struct pci_dev *pci, | |||
2437 | return -ENOENT; | 2435 | return -ENOENT; |
2438 | } | 2436 | } |
2439 | 2437 | ||
2440 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 2438 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
2439 | 0, &card); | ||
2441 | if (err < 0) | 2440 | if (err < 0) |
2442 | return err; | 2441 | return err; |
2443 | 2442 | ||
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c index 9213fb38921c..33489bcc0aff 100644 --- a/sound/pci/es1938.c +++ b/sound/pci/es1938.c | |||
@@ -1658,8 +1658,6 @@ static int snd_es1938_create(struct snd_card *card, | |||
1658 | return err; | 1658 | return err; |
1659 | } | 1659 | } |
1660 | 1660 | ||
1661 | snd_card_set_dev(card, &pci->dev); | ||
1662 | |||
1663 | *rchip = chip; | 1661 | *rchip = chip; |
1664 | return 0; | 1662 | return 0; |
1665 | } | 1663 | } |
@@ -1808,7 +1806,8 @@ static int snd_es1938_probe(struct pci_dev *pci, | |||
1808 | return -ENOENT; | 1806 | return -ENOENT; |
1809 | } | 1807 | } |
1810 | 1808 | ||
1811 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 1809 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
1810 | 0, &card); | ||
1812 | if (err < 0) | 1811 | if (err < 0) |
1813 | return err; | 1812 | return err; |
1814 | for (idx = 0; idx < 5; idx++) { | 1813 | for (idx = 0; idx < 5; idx++) { |
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c index 772cc36f951d..87e9cd5d3ceb 100644 --- a/sound/pci/es1968.c +++ b/sound/pci/es1968.c | |||
@@ -2783,8 +2783,6 @@ static int snd_es1968_create(struct snd_card *card, | |||
2783 | return err; | 2783 | return err; |
2784 | } | 2784 | } |
2785 | 2785 | ||
2786 | snd_card_set_dev(card, &pci->dev); | ||
2787 | |||
2788 | #ifdef CONFIG_SND_ES1968_RADIO | 2786 | #ifdef CONFIG_SND_ES1968_RADIO |
2789 | /* don't play with GPIOs on laptops */ | 2787 | /* don't play with GPIOs on laptops */ |
2790 | if (chip->pci->subsystem_vendor != 0x125d) | 2788 | if (chip->pci->subsystem_vendor != 0x125d) |
@@ -2836,7 +2834,8 @@ static int snd_es1968_probe(struct pci_dev *pci, | |||
2836 | return -ENOENT; | 2834 | return -ENOENT; |
2837 | } | 2835 | } |
2838 | 2836 | ||
2839 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 2837 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
2838 | 0, &card); | ||
2840 | if (err < 0) | 2839 | if (err < 0) |
2841 | return err; | 2840 | return err; |
2842 | 2841 | ||
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c index 45bc8a95b7c4..8b6af212cbfe 100644 --- a/sound/pci/fm801.c +++ b/sound/pci/fm801.c | |||
@@ -1251,8 +1251,6 @@ static int snd_fm801_create(struct snd_card *card, | |||
1251 | return err; | 1251 | return err; |
1252 | } | 1252 | } |
1253 | 1253 | ||
1254 | snd_card_set_dev(card, &pci->dev); | ||
1255 | |||
1256 | #ifdef CONFIG_SND_FM801_TEA575X_BOOL | 1254 | #ifdef CONFIG_SND_FM801_TEA575X_BOOL |
1257 | err = v4l2_device_register(&pci->dev, &chip->v4l2_dev); | 1255 | err = v4l2_device_register(&pci->dev, &chip->v4l2_dev); |
1258 | if (err < 0) { | 1256 | if (err < 0) { |
@@ -1312,7 +1310,8 @@ static int snd_card_fm801_probe(struct pci_dev *pci, | |||
1312 | return -ENOENT; | 1310 | return -ENOENT; |
1313 | } | 1311 | } |
1314 | 1312 | ||
1315 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 1313 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
1314 | 0, &card); | ||
1316 | if (err < 0) | 1315 | if (err < 0) |
1317 | return err; | 1316 | return err; |
1318 | if ((err = snd_fm801_create(card, pci, tea575x_tuner[dev], radio_nr[dev], &chip)) < 0) { | 1317 | if ((err = snd_fm801_create(card, pci, tea575x_tuner[dev], radio_nr[dev], &chip)) < 0) { |
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index d8d9bf3c3787..0870f5f3ed1c 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -3823,14 +3823,13 @@ static int azx_probe(struct pci_dev *pci, | |||
3823 | return -ENOENT; | 3823 | return -ENOENT; |
3824 | } | 3824 | } |
3825 | 3825 | ||
3826 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 3826 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
3827 | 0, &card); | ||
3827 | if (err < 0) { | 3828 | if (err < 0) { |
3828 | snd_printk(KERN_ERR "hda-intel: Error creating card!\n"); | 3829 | snd_printk(KERN_ERR "hda-intel: Error creating card!\n"); |
3829 | return err; | 3830 | return err; |
3830 | } | 3831 | } |
3831 | 3832 | ||
3832 | snd_card_set_dev(card, &pci->dev); | ||
3833 | |||
3834 | err = azx_create(card, pci, dev, pci_id->driver_data, &chip); | 3833 | err = azx_create(card, pci, dev, pci_id->driver_data, &chip); |
3835 | if (err < 0) | 3834 | if (err < 0) |
3836 | goto out_free; | 3835 | goto out_free; |
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c index 28ec872e54c0..99c022a0d612 100644 --- a/sound/pci/ice1712/ice1712.c +++ b/sound/pci/ice1712/ice1712.c | |||
@@ -2639,8 +2639,6 @@ static int snd_ice1712_create(struct snd_card *card, | |||
2639 | return err; | 2639 | return err; |
2640 | } | 2640 | } |
2641 | 2641 | ||
2642 | snd_card_set_dev(card, &pci->dev); | ||
2643 | |||
2644 | *r_ice1712 = ice; | 2642 | *r_ice1712 = ice; |
2645 | return 0; | 2643 | return 0; |
2646 | } | 2644 | } |
@@ -2670,7 +2668,8 @@ static int snd_ice1712_probe(struct pci_dev *pci, | |||
2670 | return -ENOENT; | 2668 | return -ENOENT; |
2671 | } | 2669 | } |
2672 | 2670 | ||
2673 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 2671 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
2672 | 0, &card); | ||
2674 | if (err < 0) | 2673 | if (err < 0) |
2675 | return err; | 2674 | return err; |
2676 | 2675 | ||
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c index 500471778291..cf1ba116a772 100644 --- a/sound/pci/ice1712/ice1724.c +++ b/sound/pci/ice1712/ice1724.c | |||
@@ -2609,8 +2609,6 @@ static int snd_vt1724_create(struct snd_card *card, | |||
2609 | return err; | 2609 | return err; |
2610 | } | 2610 | } |
2611 | 2611 | ||
2612 | snd_card_set_dev(card, &pci->dev); | ||
2613 | |||
2614 | *r_ice1712 = ice; | 2612 | *r_ice1712 = ice; |
2615 | return 0; | 2613 | return 0; |
2616 | } | 2614 | } |
@@ -2638,7 +2636,8 @@ static int snd_vt1724_probe(struct pci_dev *pci, | |||
2638 | return -ENOENT; | 2636 | return -ENOENT; |
2639 | } | 2637 | } |
2640 | 2638 | ||
2641 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 2639 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
2640 | 0, &card); | ||
2642 | if (err < 0) | 2641 | if (err < 0) |
2643 | return err; | 2642 | return err; |
2644 | 2643 | ||
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 08d8733604a2..ff24acf06bdd 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c | |||
@@ -3217,8 +3217,6 @@ static int snd_intel8x0_create(struct snd_card *card, | |||
3217 | return err; | 3217 | return err; |
3218 | } | 3218 | } |
3219 | 3219 | ||
3220 | snd_card_set_dev(card, &pci->dev); | ||
3221 | |||
3222 | *r_intel8x0 = chip; | 3220 | *r_intel8x0 = chip; |
3223 | return 0; | 3221 | return 0; |
3224 | } | 3222 | } |
@@ -3285,7 +3283,7 @@ static int snd_intel8x0_probe(struct pci_dev *pci, | |||
3285 | int err; | 3283 | int err; |
3286 | struct shortname_table *name; | 3284 | struct shortname_table *name; |
3287 | 3285 | ||
3288 | err = snd_card_create(index, id, THIS_MODULE, 0, &card); | 3286 | err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card); |
3289 | if (err < 0) | 3287 | if (err < 0) |
3290 | return err; | 3288 | return err; |
3291 | 3289 | ||
diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 3573c1193665..f8c72bd8a3cd 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c | |||
@@ -1243,8 +1243,6 @@ static int snd_intel8x0m_create(struct snd_card *card, | |||
1243 | return err; | 1243 | return err; |
1244 | } | 1244 | } |
1245 | 1245 | ||
1246 | snd_card_set_dev(card, &pci->dev); | ||
1247 | |||
1248 | *r_intel8x0m = chip; | 1246 | *r_intel8x0m = chip; |
1249 | return 0; | 1247 | return 0; |
1250 | } | 1248 | } |
@@ -1283,7 +1281,7 @@ static int snd_intel8x0m_probe(struct pci_dev *pci, | |||
1283 | int err; | 1281 | int err; |
1284 | struct shortname_table *name; | 1282 | struct shortname_table *name; |
1285 | 1283 | ||
1286 | err = snd_card_create(index, id, THIS_MODULE, 0, &card); | 1284 | err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card); |
1287 | if (err < 0) | 1285 | if (err < 0) |
1288 | return err; | 1286 | return err; |
1289 | 1287 | ||
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 9cf9829555d4..8f36d77f01e5 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c | |||
@@ -2418,8 +2418,6 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci, | |||
2418 | 2418 | ||
2419 | snd_korg1212_proc_init(korg1212); | 2419 | snd_korg1212_proc_init(korg1212); |
2420 | 2420 | ||
2421 | snd_card_set_dev(card, &pci->dev); | ||
2422 | |||
2423 | * rchip = korg1212; | 2421 | * rchip = korg1212; |
2424 | return 0; | 2422 | return 0; |
2425 | 2423 | ||
@@ -2445,7 +2443,8 @@ snd_korg1212_probe(struct pci_dev *pci, | |||
2445 | dev++; | 2443 | dev++; |
2446 | return -ENOENT; | 2444 | return -ENOENT; |
2447 | } | 2445 | } |
2448 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 2446 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
2447 | 0, &card); | ||
2449 | if (err < 0) | 2448 | if (err < 0) |
2450 | return err; | 2449 | return err; |
2451 | 2450 | ||
diff --git a/sound/pci/lola/lola.c b/sound/pci/lola/lola.c index 0568540dc8d3..56d4f94daea2 100644 --- a/sound/pci/lola/lola.c +++ b/sound/pci/lola/lola.c | |||
@@ -717,14 +717,13 @@ static int lola_probe(struct pci_dev *pci, | |||
717 | return -ENOENT; | 717 | return -ENOENT; |
718 | } | 718 | } |
719 | 719 | ||
720 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 720 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
721 | 0, &card); | ||
721 | if (err < 0) { | 722 | if (err < 0) { |
722 | snd_printk(KERN_ERR SFX "Error creating card!\n"); | 723 | snd_printk(KERN_ERR SFX "Error creating card!\n"); |
723 | return err; | 724 | return err; |
724 | } | 725 | } |
725 | 726 | ||
726 | snd_card_set_dev(card, &pci->dev); | ||
727 | |||
728 | err = lola_create(card, pci, dev, &chip); | 727 | err = lola_create(card, pci, dev, &chip); |
729 | if (err < 0) | 728 | if (err < 0) |
730 | goto out_free; | 729 | goto out_free; |
diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c index 5fcaaa6da4a8..b9743d4fa1cc 100644 --- a/sound/pci/lx6464es/lx6464es.c +++ b/sound/pci/lx6464es/lx6464es.c | |||
@@ -1062,8 +1062,6 @@ static int snd_lx6464es_create(struct snd_card *card, | |||
1062 | if (err < 0) | 1062 | if (err < 0) |
1063 | return err; | 1063 | return err; |
1064 | 1064 | ||
1065 | snd_card_set_dev(card, &pci->dev); | ||
1066 | |||
1067 | *rchip = chip; | 1065 | *rchip = chip; |
1068 | return 0; | 1066 | return 0; |
1069 | 1067 | ||
@@ -1099,7 +1097,8 @@ static int snd_lx6464es_probe(struct pci_dev *pci, | |||
1099 | return -ENOENT; | 1097 | return -ENOENT; |
1100 | } | 1098 | } |
1101 | 1099 | ||
1102 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 1100 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
1101 | 0, &card); | ||
1103 | if (err < 0) | 1102 | if (err < 0) |
1104 | return err; | 1103 | return err; |
1105 | 1104 | ||
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c index d5417360f51f..076c3ec000c0 100644 --- a/sound/pci/maestro3.c +++ b/sound/pci/maestro3.c | |||
@@ -2693,8 +2693,6 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci, | |||
2693 | snd_m3_enable_ints(chip); | 2693 | snd_m3_enable_ints(chip); |
2694 | snd_m3_assp_continue(chip); | 2694 | snd_m3_assp_continue(chip); |
2695 | 2695 | ||
2696 | snd_card_set_dev(card, &pci->dev); | ||
2697 | |||
2698 | *chip_ret = chip; | 2696 | *chip_ret = chip; |
2699 | 2697 | ||
2700 | return 0; | 2698 | return 0; |
@@ -2721,7 +2719,8 @@ snd_m3_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | |||
2721 | return -ENOENT; | 2719 | return -ENOENT; |
2722 | } | 2720 | } |
2723 | 2721 | ||
2724 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 2722 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
2723 | 0, &card); | ||
2725 | if (err < 0) | 2724 | if (err < 0) |
2726 | return err; | 2725 | return err; |
2727 | 2726 | ||
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index 1e0f6ee193f0..9ab057bb9859 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
@@ -1028,8 +1028,6 @@ static int snd_mixart_create(struct mixart_mgr *mgr, struct snd_card *card, int | |||
1028 | } | 1028 | } |
1029 | 1029 | ||
1030 | mgr->chip[idx] = chip; | 1030 | mgr->chip[idx] = chip; |
1031 | snd_card_set_dev(card, &mgr->pci->dev); | ||
1032 | |||
1033 | return 0; | 1031 | return 0; |
1034 | } | 1032 | } |
1035 | 1033 | ||
@@ -1308,7 +1306,8 @@ static int snd_mixart_probe(struct pci_dev *pci, | |||
1308 | else | 1306 | else |
1309 | idx = index[dev] + i; | 1307 | idx = index[dev] + i; |
1310 | snprintf(tmpid, sizeof(tmpid), "%s-%d", id[dev] ? id[dev] : "MIXART", i); | 1308 | snprintf(tmpid, sizeof(tmpid), "%s-%d", id[dev] ? id[dev] : "MIXART", i); |
1311 | err = snd_card_create(idx, tmpid, THIS_MODULE, 0, &card); | 1309 | err = snd_card_new(&pci->dev, idx, tmpid, THIS_MODULE, |
1310 | 0, &card); | ||
1312 | 1311 | ||
1313 | if (err < 0) { | 1312 | if (err < 0) { |
1314 | snd_printk(KERN_ERR "cannot allocate the card %d\n", i); | 1313 | snd_printk(KERN_ERR "cannot allocate the card %d\n", i); |
diff --git a/sound/pci/nm256/nm256.c b/sound/pci/nm256/nm256.c index fe79fff4c6dc..b7afd9c8dcd7 100644 --- a/sound/pci/nm256/nm256.c +++ b/sound/pci/nm256/nm256.c | |||
@@ -1626,8 +1626,6 @@ snd_nm256_create(struct snd_card *card, struct pci_dev *pci, | |||
1626 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) | 1626 | if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops)) < 0) |
1627 | goto __error; | 1627 | goto __error; |
1628 | 1628 | ||
1629 | snd_card_set_dev(card, &pci->dev); | ||
1630 | |||
1631 | *chip_ret = chip; | 1629 | *chip_ret = chip; |
1632 | return 0; | 1630 | return 0; |
1633 | 1631 | ||
@@ -1676,7 +1674,7 @@ static int snd_nm256_probe(struct pci_dev *pci, | |||
1676 | } | 1674 | } |
1677 | } | 1675 | } |
1678 | 1676 | ||
1679 | err = snd_card_create(index, id, THIS_MODULE, 0, &card); | 1677 | err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card); |
1680 | if (err < 0) | 1678 | if (err < 0) |
1681 | return err; | 1679 | return err; |
1682 | 1680 | ||
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index b0cb48adddc7..efa610cd735c 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c | |||
@@ -595,7 +595,8 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, | |||
595 | const struct pci_device_id *pci_id; | 595 | const struct pci_device_id *pci_id; |
596 | int err; | 596 | int err; |
597 | 597 | ||
598 | err = snd_card_create(index, id, owner, sizeof(*chip), &card); | 598 | err = snd_card_new(&pci->dev, index, id, owner, |
599 | sizeof(*chip), &card); | ||
599 | if (err < 0) | 600 | if (err < 0) |
600 | return err; | 601 | return err; |
601 | 602 | ||
@@ -648,7 +649,6 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, | |||
648 | } | 649 | } |
649 | 650 | ||
650 | pci_set_master(pci); | 651 | pci_set_master(pci); |
651 | snd_card_set_dev(card, &pci->dev); | ||
652 | card->private_free = oxygen_card_free; | 652 | card->private_free = oxygen_card_free; |
653 | 653 | ||
654 | configure_pcie_bridge(pci); | 654 | configure_pcie_bridge(pci); |
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index d379b284955b..3880f6da9a87 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c | |||
@@ -1239,7 +1239,6 @@ static int pcxhr_create(struct pcxhr_mgr *mgr, | |||
1239 | } | 1239 | } |
1240 | 1240 | ||
1241 | mgr->chip[idx] = chip; | 1241 | mgr->chip[idx] = chip; |
1242 | snd_card_set_dev(card, &mgr->pci->dev); | ||
1243 | 1242 | ||
1244 | return 0; | 1243 | return 0; |
1245 | } | 1244 | } |
@@ -1638,7 +1637,8 @@ static int pcxhr_probe(struct pci_dev *pci, | |||
1638 | 1637 | ||
1639 | snprintf(tmpid, sizeof(tmpid), "%s-%d", | 1638 | snprintf(tmpid, sizeof(tmpid), "%s-%d", |
1640 | id[dev] ? id[dev] : card_name, i); | 1639 | id[dev] ? id[dev] : card_name, i); |
1641 | err = snd_card_create(idx, tmpid, THIS_MODULE, 0, &card); | 1640 | err = snd_card_new(&pci->dev, idx, tmpid, THIS_MODULE, |
1641 | 0, &card); | ||
1642 | 1642 | ||
1643 | if (err < 0) { | 1643 | if (err < 0) { |
1644 | snd_printk(KERN_ERR "cannot allocate the card %d\n", i); | 1644 | snd_printk(KERN_ERR "cannot allocate the card %d\n", i); |
diff --git a/sound/pci/riptide/riptide.c b/sound/pci/riptide/riptide.c index 56cc891e395e..b4a8278241b1 100644 --- a/sound/pci/riptide/riptide.c +++ b/sound/pci/riptide/riptide.c | |||
@@ -1916,8 +1916,6 @@ snd_riptide_create(struct snd_card *card, struct pci_dev *pci, | |||
1916 | return err; | 1916 | return err; |
1917 | } | 1917 | } |
1918 | 1918 | ||
1919 | snd_card_set_dev(card, &pci->dev); | ||
1920 | |||
1921 | *rchip = chip; | 1919 | *rchip = chip; |
1922 | return 0; | 1920 | return 0; |
1923 | } | 1921 | } |
@@ -2086,7 +2084,8 @@ snd_card_riptide_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | |||
2086 | return -ENOENT; | 2084 | return -ENOENT; |
2087 | } | 2085 | } |
2088 | 2086 | ||
2089 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 2087 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
2088 | 0, &card); | ||
2090 | if (err < 0) | 2089 | if (err < 0) |
2091 | return err; | 2090 | return err; |
2092 | err = snd_riptide_create(card, pci, &chip); | 2091 | err = snd_riptide_create(card, pci, &chip); |
diff --git a/sound/pci/rme32.c b/sound/pci/rme32.c index cc26346ae66b..77465cc03e95 100644 --- a/sound/pci/rme32.c +++ b/sound/pci/rme32.c | |||
@@ -1938,15 +1938,14 @@ snd_rme32_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) | |||
1938 | return -ENOENT; | 1938 | return -ENOENT; |
1939 | } | 1939 | } |
1940 | 1940 | ||
1941 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, | 1941 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
1942 | sizeof(struct rme32), &card); | 1942 | sizeof(struct rme32), &card); |
1943 | if (err < 0) | 1943 | if (err < 0) |
1944 | return err; | 1944 | return err; |
1945 | card->private_free = snd_rme32_card_free; | 1945 | card->private_free = snd_rme32_card_free; |
1946 | rme32 = (struct rme32 *) card->private_data; | 1946 | rme32 = (struct rme32 *) card->private_data; |
1947 | rme32->card = card; | 1947 | rme32->card = card; |
1948 | rme32->pci = pci; | 1948 | rme32->pci = pci; |
1949 | snd_card_set_dev(card, &pci->dev); | ||
1950 | if (fullduplex[dev]) | 1949 | if (fullduplex[dev]) |
1951 | rme32->fullduplex_mode = 1; | 1950 | rme32->fullduplex_mode = 1; |
1952 | if ((err = snd_rme32_create(rme32)) < 0) { | 1951 | if ((err = snd_rme32_create(rme32)) < 0) { |
diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c index 0236363c301f..00d46116e04a 100644 --- a/sound/pci/rme96.c +++ b/sound/pci/rme96.c | |||
@@ -2475,15 +2475,14 @@ snd_rme96_probe(struct pci_dev *pci, | |||
2475 | dev++; | 2475 | dev++; |
2476 | return -ENOENT; | 2476 | return -ENOENT; |
2477 | } | 2477 | } |
2478 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, | 2478 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
2479 | sizeof(struct rme96), &card); | 2479 | sizeof(struct rme96), &card); |
2480 | if (err < 0) | 2480 | if (err < 0) |
2481 | return err; | 2481 | return err; |
2482 | card->private_free = snd_rme96_card_free; | 2482 | card->private_free = snd_rme96_card_free; |
2483 | rme96 = card->private_data; | 2483 | rme96 = card->private_data; |
2484 | rme96->card = card; | 2484 | rme96->card = card; |
2485 | rme96->pci = pci; | 2485 | rme96->pci = pci; |
2486 | snd_card_set_dev(card, &pci->dev); | ||
2487 | if ((err = snd_rme96_create(rme96)) < 0) { | 2486 | if ((err = snd_rme96_create(rme96)) < 0) { |
2488 | snd_card_free(card); | 2487 | snd_card_free(card); |
2489 | return err; | 2488 | return err; |
diff --git a/sound/pci/rme9652/hdsp.c b/sound/pci/rme9652/hdsp.c index bd90c80bb494..825fbbea7f6f 100644 --- a/sound/pci/rme9652/hdsp.c +++ b/sound/pci/rme9652/hdsp.c | |||
@@ -5375,8 +5375,8 @@ static int snd_hdsp_probe(struct pci_dev *pci, | |||
5375 | return -ENOENT; | 5375 | return -ENOENT; |
5376 | } | 5376 | } |
5377 | 5377 | ||
5378 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, | 5378 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
5379 | sizeof(struct hdsp), &card); | 5379 | sizeof(struct hdsp), &card); |
5380 | if (err < 0) | 5380 | if (err < 0) |
5381 | return err; | 5381 | return err; |
5382 | 5382 | ||
@@ -5384,7 +5384,6 @@ static int snd_hdsp_probe(struct pci_dev *pci, | |||
5384 | card->private_free = snd_hdsp_card_free; | 5384 | card->private_free = snd_hdsp_card_free; |
5385 | hdsp->dev = dev; | 5385 | hdsp->dev = dev; |
5386 | hdsp->pci = pci; | 5386 | hdsp->pci = pci; |
5387 | snd_card_set_dev(card, &pci->dev); | ||
5388 | 5387 | ||
5389 | if ((err = snd_hdsp_create(card, hdsp)) < 0) { | 5388 | if ((err = snd_hdsp_create(card, hdsp)) < 0) { |
5390 | snd_card_free(card); | 5389 | snd_card_free(card); |
diff --git a/sound/pci/rme9652/hdspm.c b/sound/pci/rme9652/hdspm.c index e98dc008de0b..76016287e46f 100644 --- a/sound/pci/rme9652/hdspm.c +++ b/sound/pci/rme9652/hdspm.c | |||
@@ -7016,8 +7016,8 @@ static int snd_hdspm_probe(struct pci_dev *pci, | |||
7016 | return -ENOENT; | 7016 | return -ENOENT; |
7017 | } | 7017 | } |
7018 | 7018 | ||
7019 | err = snd_card_create(index[dev], id[dev], | 7019 | err = snd_card_new(&pci->dev, index[dev], id[dev], |
7020 | THIS_MODULE, sizeof(struct hdspm), &card); | 7020 | THIS_MODULE, sizeof(struct hdspm), &card); |
7021 | if (err < 0) | 7021 | if (err < 0) |
7022 | return err; | 7022 | return err; |
7023 | 7023 | ||
@@ -7026,8 +7026,6 @@ static int snd_hdspm_probe(struct pci_dev *pci, | |||
7026 | hdspm->dev = dev; | 7026 | hdspm->dev = dev; |
7027 | hdspm->pci = pci; | 7027 | hdspm->pci = pci; |
7028 | 7028 | ||
7029 | snd_card_set_dev(card, &pci->dev); | ||
7030 | |||
7031 | err = snd_hdspm_create(card, hdspm); | 7029 | err = snd_hdspm_create(card, hdspm); |
7032 | if (err < 0) { | 7030 | if (err < 0) { |
7033 | snd_card_free(card); | 7031 | snd_card_free(card); |
diff --git a/sound/pci/rme9652/rme9652.c b/sound/pci/rme9652/rme9652.c index 1503ee3585fd..a62d6e13d8ce 100644 --- a/sound/pci/rme9652/rme9652.c +++ b/sound/pci/rme9652/rme9652.c | |||
@@ -2587,8 +2587,8 @@ static int snd_rme9652_probe(struct pci_dev *pci, | |||
2587 | return -ENOENT; | 2587 | return -ENOENT; |
2588 | } | 2588 | } |
2589 | 2589 | ||
2590 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, | 2590 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
2591 | sizeof(struct snd_rme9652), &card); | 2591 | sizeof(struct snd_rme9652), &card); |
2592 | 2592 | ||
2593 | if (err < 0) | 2593 | if (err < 0) |
2594 | return err; | 2594 | return err; |
@@ -2597,7 +2597,6 @@ static int snd_rme9652_probe(struct pci_dev *pci, | |||
2597 | card->private_free = snd_rme9652_card_free; | 2597 | card->private_free = snd_rme9652_card_free; |
2598 | rme9652->dev = dev; | 2598 | rme9652->dev = dev; |
2599 | rme9652->pci = pci; | 2599 | rme9652->pci = pci; |
2600 | snd_card_set_dev(card, &pci->dev); | ||
2601 | 2600 | ||
2602 | if ((err = snd_rme9652_create(card, rme9652, precise_ptr[dev])) < 0) { | 2601 | if ((err = snd_rme9652_create(card, rme9652, precise_ptr[dev])) < 0) { |
2603 | snd_card_free(card); | 2602 | snd_card_free(card); |
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c index e413b4e2c819..6b26b93e001d 100644 --- a/sound/pci/sis7019.c +++ b/sound/pci/sis7019.c | |||
@@ -1404,8 +1404,6 @@ static int sis_chip_create(struct snd_card *card, | |||
1404 | if (rc) | 1404 | if (rc) |
1405 | goto error_out_cleanup; | 1405 | goto error_out_cleanup; |
1406 | 1406 | ||
1407 | snd_card_set_dev(card, &pci->dev); | ||
1408 | |||
1409 | return 0; | 1407 | return 0; |
1410 | 1408 | ||
1411 | error_out_cleanup: | 1409 | error_out_cleanup: |
@@ -1440,7 +1438,8 @@ static int snd_sis7019_probe(struct pci_dev *pci, | |||
1440 | if (!codecs) | 1438 | if (!codecs) |
1441 | codecs = SIS_PRIMARY_CODEC_PRESENT; | 1439 | codecs = SIS_PRIMARY_CODEC_PRESENT; |
1442 | 1440 | ||
1443 | rc = snd_card_create(index, id, THIS_MODULE, sizeof(*sis), &card); | 1441 | rc = snd_card_new(&pci->dev, index, id, THIS_MODULE, |
1442 | sizeof(*sis), &card); | ||
1444 | if (rc < 0) | 1443 | if (rc < 0) |
1445 | goto error_out; | 1444 | goto error_out; |
1446 | 1445 | ||
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c index 2a46bf98af30..9ff408fff7b0 100644 --- a/sound/pci/sonicvibes.c +++ b/sound/pci/sonicvibes.c | |||
@@ -1392,8 +1392,6 @@ static int snd_sonicvibes_create(struct snd_card *card, | |||
1392 | 1392 | ||
1393 | snd_sonicvibes_proc_init(sonic); | 1393 | snd_sonicvibes_proc_init(sonic); |
1394 | 1394 | ||
1395 | snd_card_set_dev(card, &pci->dev); | ||
1396 | |||
1397 | *rsonic = sonic; | 1395 | *rsonic = sonic; |
1398 | return 0; | 1396 | return 0; |
1399 | } | 1397 | } |
@@ -1459,7 +1457,8 @@ static int snd_sonic_probe(struct pci_dev *pci, | |||
1459 | return -ENOENT; | 1457 | return -ENOENT; |
1460 | } | 1458 | } |
1461 | 1459 | ||
1462 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 1460 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
1461 | 0, &card); | ||
1463 | if (err < 0) | 1462 | if (err < 0) |
1464 | return err; | 1463 | return err; |
1465 | for (idx = 0; idx < 5; idx++) { | 1464 | for (idx = 0; idx < 5; idx++) { |
diff --git a/sound/pci/trident/trident.c b/sound/pci/trident/trident.c index b3b588bc94c3..d852458caf38 100644 --- a/sound/pci/trident/trident.c +++ b/sound/pci/trident/trident.c | |||
@@ -89,7 +89,8 @@ static int snd_trident_probe(struct pci_dev *pci, | |||
89 | return -ENOENT; | 89 | return -ENOENT; |
90 | } | 90 | } |
91 | 91 | ||
92 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 92 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
93 | 0, &card); | ||
93 | if (err < 0) | 94 | if (err < 0) |
94 | return err; | 95 | return err; |
95 | 96 | ||
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c index fb0e1586a6f8..4f3c4be30a48 100644 --- a/sound/pci/trident/trident_main.c +++ b/sound/pci/trident/trident_main.c | |||
@@ -3664,7 +3664,6 @@ int snd_trident_create(struct snd_card *card, | |||
3664 | snd_trident_enable_eso(trident); | 3664 | snd_trident_enable_eso(trident); |
3665 | 3665 | ||
3666 | snd_trident_proc_init(trident); | 3666 | snd_trident_proc_init(trident); |
3667 | snd_card_set_dev(card, &pci->dev); | ||
3668 | *rtrident = trident; | 3667 | *rtrident = trident; |
3669 | return 0; | 3668 | return 0; |
3670 | } | 3669 | } |
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c index 5ae6f042c586..20d2eeeecf47 100644 --- a/sound/pci/via82xx.c +++ b/sound/pci/via82xx.c | |||
@@ -2441,8 +2441,6 @@ static int snd_via82xx_create(struct snd_card *card, | |||
2441 | * We call pci_set_master here because it does not hurt. */ | 2441 | * We call pci_set_master here because it does not hurt. */ |
2442 | pci_set_master(pci); | 2442 | pci_set_master(pci); |
2443 | 2443 | ||
2444 | snd_card_set_dev(card, &pci->dev); | ||
2445 | |||
2446 | *r_via = chip; | 2444 | *r_via = chip; |
2447 | return 0; | 2445 | return 0; |
2448 | } | 2446 | } |
@@ -2544,7 +2542,7 @@ static int snd_via82xx_probe(struct pci_dev *pci, | |||
2544 | unsigned int i; | 2542 | unsigned int i; |
2545 | int err; | 2543 | int err; |
2546 | 2544 | ||
2547 | err = snd_card_create(index, id, THIS_MODULE, 0, &card); | 2545 | err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card); |
2548 | if (err < 0) | 2546 | if (err < 0) |
2549 | return err; | 2547 | return err; |
2550 | 2548 | ||
diff --git a/sound/pci/via82xx_modem.c b/sound/pci/via82xx_modem.c index ca190283cbd7..519740154824 100644 --- a/sound/pci/via82xx_modem.c +++ b/sound/pci/via82xx_modem.c | |||
@@ -1161,8 +1161,6 @@ static int snd_via82xx_create(struct snd_card *card, | |||
1161 | * We call pci_set_master here because it does not hurt. */ | 1161 | * We call pci_set_master here because it does not hurt. */ |
1162 | pci_set_master(pci); | 1162 | pci_set_master(pci); |
1163 | 1163 | ||
1164 | snd_card_set_dev(card, &pci->dev); | ||
1165 | |||
1166 | *r_via = chip; | 1164 | *r_via = chip; |
1167 | return 0; | 1165 | return 0; |
1168 | } | 1166 | } |
@@ -1177,7 +1175,7 @@ static int snd_via82xx_probe(struct pci_dev *pci, | |||
1177 | unsigned int i; | 1175 | unsigned int i; |
1178 | int err; | 1176 | int err; |
1179 | 1177 | ||
1180 | err = snd_card_create(index, id, THIS_MODULE, 0, &card); | 1178 | err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card); |
1181 | if (err < 0) | 1179 | if (err < 0) |
1182 | return err; | 1180 | return err; |
1183 | 1181 | ||
diff --git a/sound/pci/vx222/vx222.c b/sound/pci/vx222/vx222.c index ab8a9b1bfb8e..4323556c13f8 100644 --- a/sound/pci/vx222/vx222.c +++ b/sound/pci/vx222/vx222.c | |||
@@ -181,8 +181,6 @@ static int snd_vx222_create(struct snd_card *card, struct pci_dev *pci, | |||
181 | return err; | 181 | return err; |
182 | } | 182 | } |
183 | 183 | ||
184 | snd_card_set_dev(card, &pci->dev); | ||
185 | |||
186 | *rchip = vx; | 184 | *rchip = vx; |
187 | return 0; | 185 | return 0; |
188 | } | 186 | } |
@@ -204,7 +202,8 @@ static int snd_vx222_probe(struct pci_dev *pci, | |||
204 | return -ENOENT; | 202 | return -ENOENT; |
205 | } | 203 | } |
206 | 204 | ||
207 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 205 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
206 | 0, &card); | ||
208 | if (err < 0) | 207 | if (err < 0) |
209 | return err; | 208 | return err; |
210 | 209 | ||
diff --git a/sound/pci/ymfpci/ymfpci.c b/sound/pci/ymfpci/ymfpci.c index e8932b2e4a5d..6ff4ea389b02 100644 --- a/sound/pci/ymfpci/ymfpci.c +++ b/sound/pci/ymfpci/ymfpci.c | |||
@@ -187,7 +187,8 @@ static int snd_card_ymfpci_probe(struct pci_dev *pci, | |||
187 | return -ENOENT; | 187 | return -ENOENT; |
188 | } | 188 | } |
189 | 189 | ||
190 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 190 | err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE, |
191 | 0, &card); | ||
191 | if (err < 0) | 192 | if (err < 0) |
192 | return err; | 193 | return err; |
193 | 194 | ||
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c index d591c154fc58..c7e98ff4f80f 100644 --- a/sound/pci/ymfpci/ymfpci_main.c +++ b/sound/pci/ymfpci/ymfpci_main.c | |||
@@ -2487,8 +2487,6 @@ int snd_ymfpci_create(struct snd_card *card, | |||
2487 | 2487 | ||
2488 | snd_ymfpci_proc_init(card, chip); | 2488 | snd_ymfpci_proc_init(card, chip); |
2489 | 2489 | ||
2490 | snd_card_set_dev(card, &pci->dev); | ||
2491 | |||
2492 | *rchip = chip; | 2490 | *rchip = chip; |
2493 | return 0; | 2491 | return 0; |
2494 | } | 2492 | } |