aboutsummaryrefslogtreecommitdiff
path: root/sound/drivers/mtpav.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/drivers/mtpav.c')
-rw-r--r--sound/drivers/mtpav.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/drivers/mtpav.c b/sound/drivers/mtpav.c
index 1280a57c49e..3a25c89d298 100644
--- a/sound/drivers/mtpav.c
+++ b/sound/drivers/mtpav.c
@@ -688,7 +688,7 @@ static int snd_mtpav_get_RAWMIDI(mtpav_t * mcard)
static mtpav_t *new_mtpav(void)
{
- mtpav_t *ncrd = kcalloc(1, sizeof(*ncrd), GFP_KERNEL);
+ mtpav_t *ncrd = kzalloc(sizeof(*ncrd), GFP_KERNEL);
if (ncrd != NULL) {
spin_lock_init(&ncrd->spinlock);
@@ -757,6 +757,9 @@ static int __init alsa_card_mtpav_init(void)
if (err < 0)
goto __error;
+ if ((err = snd_card_set_generic_dev(mtp_card->card)) < 0)
+ goto __error;
+
err = snd_card_register(mtp_card->card); // don't snd_card_register until AFTER all cards reources done!
//printk("snd_card_register returned %d\n", err);