--- seq_memory.c.old	2004-02-11 20:40:02.000000000 +0100
+++ seq_memory.c	2004-02-17 15:27:35.000000000 +0100
@@ -1,3 +1,4 @@
+#define __NO_VERSION__
 /*
  *  ALSA sequencer Memory Manager
  *  Copyright (c) 1998 by Frank van de Pol <fvdpol@coil.demon.nl>
@@ -239,7 +240,18 @@
 		set_current_state(TASK_INTERRUPTIBLE);
 		add_wait_queue(&pool->output_sleep, &wait);
 		spin_unlock_irq(&pool->lock);
+#ifdef LINUX_2_2
+		/* change semaphore to allow other clients
+		   to access device file */
+		if (file)
+			up(&semaphore_of(file));
+#endif
 		schedule();
+#ifdef LINUX_2_2
+		/* restore semaphore again */
+		if (file)
+			down(&semaphore_of(file));
+#endif
 		spin_lock_irq(&pool->lock);
 		remove_wait_queue(&pool->output_sleep, &wait);
 		/* interrupted? */
