]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - sound/pci/ca0106/ca0106_main.c
ALSA: pci: Convert to snd_card_new() with a device pointer
[mirror_ubuntu-bionic-kernel.git] / sound / pci / ca0106 / ca0106_main.c
index f4db5587e86ee9b3f509d1541b9ae85c0a64cbab..f659c7a89c0cf8dec8cff845a2f4afd5973437ff 100644 (file)
@@ -1843,7 +1843,8 @@ static int snd_ca0106_probe(struct pci_dev *pci,
                return -ENOENT;
        }
 
-       err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
+       err = snd_card_new(&pci->dev, index[dev], id[dev], THIS_MODULE,
+                          0, &card);
        if (err < 0)
                return err;
 
@@ -1878,8 +1879,6 @@ static int snd_ca0106_probe(struct pci_dev *pci,
        snd_ca0106_proc_init(chip);
 #endif
 
-       snd_card_set_dev(card, &pci->dev);
-
        err = snd_card_register(card);
        if (err < 0)
                goto error;