X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Foss%2Fsequencer.c;h=6815c30e0bc1be68fd9589040b167499b5b2cde5;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=038bf7fd31eae734f9db3ae2676d4c25b2793307;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/sound/oss/sequencer.c b/sound/oss/sequencer.c index 038bf7fd3..6815c30e0 100644 --- a/sound/oss/sequencer.c +++ b/sound/oss/sequencer.c @@ -28,7 +28,7 @@ static int pending_timer = -1; /* For timer change operation */ extern unsigned long seq_time; static int obsolete_api_used; -static spinlock_t lock=SPIN_LOCK_UNLOCKED; +static DEFINE_SPINLOCK(lock); /* * Local counts for number of synth and MIDI devices. These are initialized @@ -709,11 +709,11 @@ static void seq_local_event(unsigned char *event_rec) static void seq_sysex_message(unsigned char *event_rec) { - int dev = event_rec[1]; + unsigned int dev = event_rec[1]; int i, l = 0; unsigned char *buf = &event_rec[2]; - if ((int) dev > max_synthdev) + if (dev > max_synthdev) return; if (!(synth_open_mask & (1 << dev))) return; @@ -1091,7 +1091,7 @@ int sequencer_open(int dev, struct file *file) return 0; } -void seq_drain_midi_queues(void) +static void seq_drain_midi_queues(void) { int i, n; @@ -1671,14 +1671,7 @@ void sequencer_init(void) void sequencer_unload(void) { - if(queue) - { - vfree(queue); - queue=NULL; - } - if(iqueue) - { - vfree(iqueue); - iqueue=NULL; - } + vfree(queue); + vfree(iqueue); + queue = iqueue = NULL; }