Skip to contentSkip to conversation

[patch} turn off pcspeaker when unloading

PATCH matthieu castet 1 participant 1 message Nov 5, 2004 Input drivers

lore
Share & tools
lore
#0 lore raw

Hi,

this patch turn off the pc speaker when you unload it : with whe current version if you unload it when the speacker beep, the beep never stop.

drivers/input/misc/pcspkr.c +2 -0
@@ -89,6 +89,8 @@
 static void __exit pcspkr_exit(void)
 {
         input_unregister_device(&pcspkr_dev);
+	/* turn off the speaker */
+	pcspkr_event(NULL, EV_SND, SND_BELL, 0);
 }
 
 module_init(pcspkr_init);