From 832bb0991764d0b4350ce596d42253253f8aefa1 Mon Sep 17 00:00:00 2001 From: Preston Baxter Date: Tue, 23 Jul 2024 09:04:55 -0500 Subject: [PATCH] destroy sound card when unloading the module --- aes67.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aes67.c b/aes67.c index b7571b8..e3bcf7c 100644 --- a/aes67.c +++ b/aes67.c @@ -357,12 +357,15 @@ static int __init alsa_card_aes67_init(void) platform_device_unregister(device); return -ENODEV; } + devices[0] = device; return 0; } 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"); platform_driver_unregister(&snd_aes67_driver); }