staging/line6: Convert to snd_card_new() with a device pointer
authorTakashi Iwai <tiwai@suse.de>
Wed, 29 Jan 2014 14:02:40 +0000 (15:02 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 14 Feb 2014 07:14:10 +0000 (08:14 +0100)
Also remove superfluous snd_card_set_dev() calls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
drivers/staging/line6/audio.c
drivers/staging/line6/midi.c
drivers/staging/line6/pcm.c

index a92e21f7d55b83bb1b537e48259b1202271699fa..171d80c1b02071fdadc2e7111e34b0cde49565a6 100644 (file)
@@ -24,8 +24,9 @@ int line6_init_audio(struct usb_line6 *line6)
        struct snd_card *card;
        int err;
 
-       err = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
-                             THIS_MODULE, 0, &card);
+       err = snd_card_new(line6->ifcdev,
+                          SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
+                          THIS_MODULE, 0, &card);
        if (err < 0)
                return err;
 
index 3f6d78c585fb925d75bb630e07dab6f67c124b95..c61cd0515baf299a244c9c44ff393dfcc0cf0cda 100644 (file)
@@ -307,8 +307,6 @@ int line6_init_midi(struct usb_line6 *line6)
        if (err < 0)
                return err;
 
-       snd_card_set_dev(line6->card, line6->ifcdev);
-
        err = snd_line6_new_midi(line6midi);
        if (err < 0)
                return err;
index df8331bce1754a71206d86d426209ba2fab33075..661080b3c39df8c2f8e1c43ed9473d4eb603cc25 100644 (file)
@@ -501,8 +501,6 @@ int line6_init_pcm(struct usb_line6 *line6,
        if (err < 0)
                return err;
 
-       snd_card_set_dev(line6->card, line6->ifcdev);
-
        err = snd_line6_new_pcm(line6pcm);
        if (err < 0)
                return err;