destroy sound card when unloading the module

This commit is contained in:
Preston Baxter 2024-07-23 09:04:55 -05:00
parent 680748286c
commit 832bb09917
1 changed files with 3 additions and 0 deletions

View File

@ -357,12 +357,15 @@ static int __init alsa_card_aes67_init(void)
platform_device_unregister(device); platform_device_unregister(device);
return -ENODEV; return -ENODEV;
} }
devices[0] = device;
return 0; return 0;
} }
static void __exit alsa_card_aes67_exit(void) static void __exit alsa_card_aes67_exit(void)
{ {
snd_printk(KERN_INFO "Attempting to unregister card for AES67\n");
platform_device_unregister(devices[0]);
snd_printk(KERN_INFO "Attempting to unregistered driver for AES67\n"); snd_printk(KERN_INFO "Attempting to unregistered driver for AES67\n");
platform_driver_unregister(&snd_aes67_driver); platform_driver_unregister(&snd_aes67_driver);
} }