linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] 9/11 sound/oss replace cli()
@ 2002-09-21 20:43 Peter Waechtler
  0 siblings, 0 replies; only message in thread
From: Peter Waechtler @ 2002-09-21 20:43 UTC (permalink / raw)
  To: linux-kernel; +Cc: Linus Torvalds

--- vanilla-2.5.36/sound/oss/ics2101.c	2002-04-20 18:25:20.000000000 
+0200
+++ linux-2.5-cli-oss/sound/oss/ics2101.c	2002-08-16 13:59:55.000000000 
+0200
@@ -15,6 +15,7 @@
   * Bartlomiej Zolnierkiewicz : added __init to ics2101_mixer_init()
   */
  #include <linux/init.h>
+#include <linux/spinlock.h>
  #include "sound_config.h"

  #include <linux/ultrasound.h>
@@ -28,6 +29,7 @@

  extern int     *gus_osp;
  extern int      gus_base;
+extern spinlock_t lock;
  static int      volumes[ICS_MIXDEVS];
  static int      left_fix[ICS_MIXDEVS] =
  {1, 1, 1, 2, 1, 2};
@@ -85,13 +87,12 @@
  		attn_addr |= 0x03;
  	}

-	save_flags(flags);
-	cli();
+	spin_lock_irqsave(&lock, flags);
  	outb((ctrl_addr), u_MixSelect);
  	outb((selector[dev]), u_MixData);
  	outb((attn_addr), u_MixSelect);
  	outb(((unsigned char) vol), u_MixData);
-	restore_flags(flags);
+	spin_unlock_irqrestore(&lock,flags);
  }

  static int set_volumes(int dev, int vol)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-09-22  9:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-21 20:43 [PATCH] 9/11 sound/oss replace cli() Peter Waechtler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).