mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-13 16:40:22 +00:00
drivers/staging: Convert to snd_card_create() for go7007
Convert from snd_card_new to the new snd_card_create() for go7007. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
758021bfa9
commit
6ff1871617
@ -248,10 +248,11 @@ int go7007_snd_init(struct go7007 *go)
|
|||||||
spin_lock_init(&gosnd->lock);
|
spin_lock_init(&gosnd->lock);
|
||||||
gosnd->hw_ptr = gosnd->w_idx = gosnd->avail = 0;
|
gosnd->hw_ptr = gosnd->w_idx = gosnd->avail = 0;
|
||||||
gosnd->capturing = 0;
|
gosnd->capturing = 0;
|
||||||
gosnd->card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
|
ret = snd_card_create(index[dev], id[dev], THIS_MODULE, 0,
|
||||||
if (gosnd->card == NULL) {
|
&gosnd->card);
|
||||||
|
if (ret < 0) {
|
||||||
kfree(gosnd);
|
kfree(gosnd);
|
||||||
return -ENOMEM;
|
return ret;
|
||||||
}
|
}
|
||||||
ret = snd_device_new(gosnd->card, SNDRV_DEV_LOWLEVEL, go,
|
ret = snd_device_new(gosnd->card, SNDRV_DEV_LOWLEVEL, go,
|
||||||
&go7007_snd_device_ops);
|
&go7007_snd_device_ops);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user