diff options
Diffstat (limited to 'sound/pci/ca0106')
-rw-r--r-- | sound/pci/ca0106/ca0106_main.c | 2 | ||||
-rw-r--r-- | sound/pci/ca0106/ca_midi.c | 20 |
2 files changed, 15 insertions, 7 deletions
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 6abe8a3bd365..a7d89662acf6 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c | |||
@@ -254,7 +254,7 @@ static struct snd_ca0106_details ca0106_chip_details[] = { | |||
254 | .name = "MSI K8N Diamond MB", | 254 | .name = "MSI K8N Diamond MB", |
255 | .gpio_type = 2, | 255 | .gpio_type = 2, |
256 | .i2c_adc = 1, | 256 | .i2c_adc = 1, |
257 | .spi_dac = 2 }, | 257 | .spi_dac = 2 } , |
258 | /* Shuttle XPC SD31P which has an onboard Creative Labs | 258 | /* Shuttle XPC SD31P which has an onboard Creative Labs |
259 | * Sound Blaster Live! 24-bit EAX | 259 | * Sound Blaster Live! 24-bit EAX |
260 | * high-definition 7.1 audio processor". | 260 | * high-definition 7.1 audio processor". |
diff --git a/sound/pci/ca0106/ca_midi.c b/sound/pci/ca0106/ca_midi.c index 893ee4f1ea77..c7885117da33 100644 --- a/sound/pci/ca0106/ca_midi.c +++ b/sound/pci/ca0106/ca_midi.c | |||
@@ -125,7 +125,8 @@ static int ca_midi_input_open(struct snd_rawmidi_substream *substream) | |||
125 | struct snd_ca_midi *midi = substream->rmidi->private_data; | 125 | struct snd_ca_midi *midi = substream->rmidi->private_data; |
126 | unsigned long flags; | 126 | unsigned long flags; |
127 | 127 | ||
128 | snd_assert(midi->dev_id, return -ENXIO); | 128 | if (snd_BUG_ON(!midi->dev_id)) |
129 | return -ENXIO; | ||
129 | spin_lock_irqsave(&midi->open_lock, flags); | 130 | spin_lock_irqsave(&midi->open_lock, flags); |
130 | midi->midi_mode |= CA_MIDI_MODE_INPUT; | 131 | midi->midi_mode |= CA_MIDI_MODE_INPUT; |
131 | midi->substream_input = substream; | 132 | midi->substream_input = substream; |
@@ -144,7 +145,8 @@ static int ca_midi_output_open(struct snd_rawmidi_substream *substream) | |||
144 | struct snd_ca_midi *midi = substream->rmidi->private_data; | 145 | struct snd_ca_midi *midi = substream->rmidi->private_data; |
145 | unsigned long flags; | 146 | unsigned long flags; |
146 | 147 | ||
147 | snd_assert(midi->dev_id, return -ENXIO); | 148 | if (snd_BUG_ON(!midi->dev_id)) |
149 | return -ENXIO; | ||
148 | spin_lock_irqsave(&midi->open_lock, flags); | 150 | spin_lock_irqsave(&midi->open_lock, flags); |
149 | midi->midi_mode |= CA_MIDI_MODE_OUTPUT; | 151 | midi->midi_mode |= CA_MIDI_MODE_OUTPUT; |
150 | midi->substream_output = substream; | 152 | midi->substream_output = substream; |
@@ -163,7 +165,8 @@ static int ca_midi_input_close(struct snd_rawmidi_substream *substream) | |||
163 | struct snd_ca_midi *midi = substream->rmidi->private_data; | 165 | struct snd_ca_midi *midi = substream->rmidi->private_data; |
164 | unsigned long flags; | 166 | unsigned long flags; |
165 | 167 | ||
166 | snd_assert(midi->dev_id, return -ENXIO); | 168 | if (snd_BUG_ON(!midi->dev_id)) |
169 | return -ENXIO; | ||
167 | spin_lock_irqsave(&midi->open_lock, flags); | 170 | spin_lock_irqsave(&midi->open_lock, flags); |
168 | midi->interrupt_disable(midi,midi->rx_enable); | 171 | midi->interrupt_disable(midi,midi->rx_enable); |
169 | midi->midi_mode &= ~CA_MIDI_MODE_INPUT; | 172 | midi->midi_mode &= ~CA_MIDI_MODE_INPUT; |
@@ -181,7 +184,9 @@ static int ca_midi_output_close(struct snd_rawmidi_substream *substream) | |||
181 | { | 184 | { |
182 | struct snd_ca_midi *midi = substream->rmidi->private_data; | 185 | struct snd_ca_midi *midi = substream->rmidi->private_data; |
183 | unsigned long flags; | 186 | unsigned long flags; |
184 | snd_assert(midi->dev_id, return -ENXIO); | 187 | |
188 | if (snd_BUG_ON(!midi->dev_id)) | ||
189 | return -ENXIO; | ||
185 | 190 | ||
186 | spin_lock_irqsave(&midi->open_lock, flags); | 191 | spin_lock_irqsave(&midi->open_lock, flags); |
187 | 192 | ||
@@ -201,7 +206,9 @@ static int ca_midi_output_close(struct snd_rawmidi_substream *substream) | |||
201 | static void ca_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) | 206 | static void ca_midi_input_trigger(struct snd_rawmidi_substream *substream, int up) |
202 | { | 207 | { |
203 | struct snd_ca_midi *midi = substream->rmidi->private_data; | 208 | struct snd_ca_midi *midi = substream->rmidi->private_data; |
204 | snd_assert(midi->dev_id, return); | 209 | |
210 | if (snd_BUG_ON(!midi->dev_id)) | ||
211 | return; | ||
205 | 212 | ||
206 | if (up) { | 213 | if (up) { |
207 | midi->interrupt_enable(midi,midi->rx_enable); | 214 | midi->interrupt_enable(midi,midi->rx_enable); |
@@ -215,7 +222,8 @@ static void ca_midi_output_trigger(struct snd_rawmidi_substream *substream, int | |||
215 | struct snd_ca_midi *midi = substream->rmidi->private_data; | 222 | struct snd_ca_midi *midi = substream->rmidi->private_data; |
216 | unsigned long flags; | 223 | unsigned long flags; |
217 | 224 | ||
218 | snd_assert(midi->dev_id, return); | 225 | if (snd_BUG_ON(!midi->dev_id)) |
226 | return; | ||
219 | 227 | ||
220 | if (up) { | 228 | if (up) { |
221 | int max = 4; | 229 | int max = 4; |