From: Badhri Jagan Sridharan Date: Wed, 25 Mar 2015 21:37:23 +0000 (-0700) Subject: usb: gadget: f_audio_source:replace deprecated API X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=795b676102b66700581daed20c3fe6961d09563a;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git usb: gadget: f_audio_source:replace deprecated API Replace snd_card_create with snd_card_new. snd_card_create depcrecated starting form v3.15 Signed-off-by: Badhri Jagan Sridharan Change-Id: I76f7d753812963d595055bce7d3e6518163482f5 --- diff --git a/drivers/usb/gadget/f_audio_source.c b/drivers/usb/gadget/f_audio_source.c index 21ced13c83d8..4b9786b48950 100644 --- a/drivers/usb/gadget/f_audio_source.c +++ b/drivers/usb/gadget/f_audio_source.c @@ -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;