patch-2.0.36 linux/drivers/char/vt.c

Next file: linux/drivers/isdn/Config.in
Previous file: linux/drivers/char/tty_io.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.35/linux/drivers/char/vt.c linux/drivers/char/vt.c
@@ -172,8 +172,10 @@
 	if (hz > 20 && hz < 32767)
 		count = 1193180 / hz;
         
+        if (!count)
+        	kd_nosound(0);
         /* ignore multiple simultaneous requests for sound */
-        if (!set_bit(0, &mksound_lock)) {
+        else if (!set_bit(0, &mksound_lock)) {
         /* set_bit in 2.0.x is same as test-and-set in 2.1.x */
                 del_timer(&sound_timer);
                 if (count) {
@@ -189,9 +191,7 @@
                                 sound_timer.expires = jiffies+ticks;
                                 add_timer(&sound_timer);
                         }
-                } else
-                        kd_nosound(0);
- 
+		} 
                 mksound_lock = 0;
         }	
 	return;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov