usb: gadget: f_audio_source:replace deprecated API
authorBadhri Jagan Sridharan <Badhri@google.com>
Wed, 25 Mar 2015 21:37:23 +0000 (14:37 -0700)
committerJohn Stultz <john.stultz@linaro.org>
Tue, 16 Feb 2016 21:52:08 +0000 (13:52 -0800)
Replace snd_card_create with snd_card_new.
snd_card_create depcrecated starting form v3.15

Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com>
Change-Id: I76f7d753812963d595055bce7d3e6518163482f5

drivers/usb/gadget/f_audio_source.c

index 21ced13c83d801b39c3bbb564bb5005706d3f42c..4b9786b489506adfff9e798d09d1a88e087b15e0 100644 (file)
@@ -788,16 +788,16 @@ int audio_source_bind_config(struct usb_configuration *c,
 
        audio = &_audio_dev;
 
-       err = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
+       err = snd_card_new(&c->cdev->gadget->dev,
+                       SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
                        THIS_MODULE, 0, &card);
        if (err)
                return err;
 
-       snd_card_set_dev(card, &c->cdev->gadget->dev);
-
        err = snd_pcm_new(card, "USB audio source", 0, 1, 0, &pcm);
        if (err)
                goto pcm_fail;
+
        pcm->private_data = audio;
        pcm->info_flags = 0;
        audio->pcm = pcm;