aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/init.c')
-rw-r--r--sound/core/init.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/core/init.c b/sound/core/init.c
index f045f7db3ab4..07acac77ea45 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -360,6 +360,12 @@ int snd_card_disconnect(struct snd_card *card)
360 snd_printk(KERN_ERR "not all devices for card %i can be disconnected\n", card->number); 360 snd_printk(KERN_ERR "not all devices for card %i can be disconnected\n", card->number);
361 361
362 snd_info_card_disconnect(card); 362 snd_info_card_disconnect(card);
363#ifndef CONFIG_SYSFS_DEPRECATED
364 if (card->card_dev) {
365 device_unregister(card->card_dev);
366 card->card_dev = NULL;
367 }
368#endif
363 return 0; 369 return 0;
364} 370}
365 371
@@ -401,10 +407,6 @@ static int snd_card_do_free(struct snd_card *card)
401 snd_printk(KERN_WARNING "unable to free card info\n"); 407 snd_printk(KERN_WARNING "unable to free card info\n");
402 /* Not fatal error */ 408 /* Not fatal error */
403 } 409 }
404#ifndef CONFIG_SYSFS_DEPRECATED
405 if (card->card_dev)
406 device_unregister(card->card_dev);
407#endif
408 kfree(card); 410 kfree(card);
409 return 0; 411 return 0;
410} 412}