X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fisa%2Fsb%2Fsb8_midi.c;h=90b01e79879dccbf53f5a06a8b4ca4cd0a22efab;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=17e0f4d1e6085de8c04dd253263254ce4d99b6a6;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/sound/isa/sb/sb8_midi.c b/sound/isa/sb/sb8_midi.c index 17e0f4d1e..90b01e798 100644 --- a/sound/isa/sb/sb8_midi.c +++ b/sound/isa/sb/sb8_midi.c @@ -73,7 +73,7 @@ static int snd_sb8dsp_midi_input_open(snd_rawmidi_substream_t * substream) sb_t *chip; unsigned int valid_open_flags; - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return -ENXIO); + chip = substream->rmidi->private_data; valid_open_flags = chip->hardware >= SB_HW_20 ? SB_OPEN_MIDI_OUTPUT | SB_OPEN_MIDI_OUTPUT_TRIGGER : 0; spin_lock_irqsave(&chip->open_lock, flags); @@ -100,7 +100,7 @@ static int snd_sb8dsp_midi_output_open(snd_rawmidi_substream_t * substream) sb_t *chip; unsigned int valid_open_flags; - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return -ENXIO); + chip = substream->rmidi->private_data; valid_open_flags = chip->hardware >= SB_HW_20 ? SB_OPEN_MIDI_INPUT | SB_OPEN_MIDI_INPUT_TRIGGER : 0; spin_lock_irqsave(&chip->open_lock, flags); @@ -126,7 +126,7 @@ static int snd_sb8dsp_midi_input_close(snd_rawmidi_substream_t * substream) unsigned long flags; sb_t *chip; - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return -ENXIO); + chip = substream->rmidi->private_data; spin_lock_irqsave(&chip->open_lock, flags); chip->open &= ~(SB_OPEN_MIDI_INPUT | SB_OPEN_MIDI_INPUT_TRIGGER); chip->midi_substream_input = NULL; @@ -144,7 +144,7 @@ static int snd_sb8dsp_midi_output_close(snd_rawmidi_substream_t * substream) unsigned long flags; sb_t *chip; - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return -ENXIO); + chip = substream->rmidi->private_data; spin_lock_irqsave(&chip->open_lock, flags); chip->open &= ~(SB_OPEN_MIDI_OUTPUT | SB_OPEN_MIDI_OUTPUT_TRIGGER); chip->midi_substream_output = NULL; @@ -162,7 +162,7 @@ static void snd_sb8dsp_midi_input_trigger(snd_rawmidi_substream_t * substream, i unsigned long flags; sb_t *chip; - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return); + chip = substream->rmidi->private_data; spin_lock_irqsave(&chip->open_lock, flags); if (up) { if (!(chip->open & SB_OPEN_MIDI_INPUT_TRIGGER)) { @@ -188,7 +188,7 @@ static void snd_sb8dsp_midi_output_write(snd_rawmidi_substream_t * substream) int max = 32; /* how big is Tx FIFO? */ - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return); + chip = substream->rmidi->private_data; while (max-- > 0) { spin_lock_irqsave(&chip->open_lock, flags); if (snd_rawmidi_transmit_peek(substream, &byte, 1) != 1) { @@ -219,7 +219,7 @@ static void snd_sb8dsp_midi_output_write(snd_rawmidi_substream_t * substream) static void snd_sb8dsp_midi_output_timer(unsigned long data) { snd_rawmidi_substream_t * substream = (snd_rawmidi_substream_t *) data; - sb_t * chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return); + sb_t * chip = substream->rmidi->private_data; unsigned long flags; spin_lock_irqsave(&chip->open_lock, flags); @@ -234,7 +234,7 @@ static void snd_sb8dsp_midi_output_trigger(snd_rawmidi_substream_t * substream, unsigned long flags; sb_t *chip; - chip = snd_magic_cast(sb_t, substream->rmidi->private_data, return); + chip = substream->rmidi->private_data; spin_lock_irqsave(&chip->open_lock, flags); if (up) { if (!(chip->open & SB_OPEN_MIDI_OUTPUT_TRIGGER)) {