[patch} turn off pcspeaker when unloading

From: matthieu castet
Date: Fri Nov 05 2004 - 09:15:49 EST


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.

Signed-Off-By: Matthieu Castet <castet.matthieu@xxxxxxx> --- linux/drivers/input/misc/pcspkr.c 2004-10-18 23:54:32.000000000 +0200
+++ linux/drivers/input/misc/pcspkr.c 2004-11-05 15:08:57.000000000 +0100
@@ -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);