aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/mixart/mixart_hwdep.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-08-08 11:12:14 -0400
committerJaroslav Kysela <perex@perex.cz>2008-08-13 05:46:38 -0400
commitda3cec35dd3c31d8706db4bf379372ce70d92118 (patch)
tree9379edebb1c7abc7a7a92ce3be30a35b77d9aa1d /sound/pci/mixart/mixart_hwdep.c
parent622207dc31895b4e82c39100db8635d885c795e2 (diff)
ALSA: Kill snd_assert() in sound/pci/*
Kill snd_assert() in sound/pci/*, either removed or replaced with if () with snd_BUG_ON(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/mixart/mixart_hwdep.c')
-rw-r--r--sound/pci/mixart/mixart_hwdep.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/sound/pci/mixart/mixart_hwdep.c b/sound/pci/mixart/mixart_hwdep.c
index f98603146132..3782b52bc0e8 100644
--- a/sound/pci/mixart/mixart_hwdep.c
+++ b/sound/pci/mixart/mixart_hwdep.c
@@ -288,7 +288,9 @@ static int mixart_enum_physio(struct mixart_mgr *mgr)
288 return -EINVAL; 288 return -EINVAL;
289 } 289 }
290 290
291 snd_assert(phys_io.nb_uid >= (MIXART_MAX_CARDS * 2), return -EINVAL); /* min 2 phys io per card (analog in + analog out) */ 291 /* min 2 phys io per card (analog in + analog out) */
292 if (phys_io.nb_uid < MIXART_MAX_CARDS * 2)
293 return -EINVAL;
292 294
293 for(k=0; k<mgr->num_cards; k++) { 295 for(k=0; k<mgr->num_cards; k++) {
294 mgr->chip[k]->uid_in_analog_physio = phys_io.uid[k]; 296 mgr->chip[k]->uid_in_analog_physio = phys_io.uid[k];
@@ -363,8 +365,10 @@ static int mixart_dsp_load(struct mixart_mgr* mgr, int index, const struct firmw
363 } 365 }
364 366
365 /* check xilinx validity */ 367 /* check xilinx validity */
366 snd_assert(((u32*)(dsp->data))[0]==0xFFFFFFFF, return -EINVAL); 368 if (((u32*)(dsp->data))[0] == 0xffffffff)
367 snd_assert(dsp->size % 4 == 0, return -EINVAL); 369 return -EINVAL;
370 if (dsp->size % 4)
371 return -EINVAL;
368 372
369 /* set xilinx status to copying */ 373 /* set xilinx status to copying */
370 writel_be( 1, MIXART_MEM( mgr, MIXART_PSEUDOREG_MXLX_STATUS_OFFSET )); 374 writel_be( 1, MIXART_MEM( mgr, MIXART_PSEUDOREG_MXLX_STATUS_OFFSET ));
@@ -462,8 +466,10 @@ static int mixart_dsp_load(struct mixart_mgr* mgr, int index, const struct firmw
462 } 466 }
463 467
464 /* check daughterboard xilinx validity */ 468 /* check daughterboard xilinx validity */
465 snd_assert(((u32*)(dsp->data))[0]==0xFFFFFFFF, return -EINVAL); 469 if (((u32*)(dsp->data))[0] == 0xffffffff)
466 snd_assert(dsp->size % 4 == 0, return -EINVAL); 470 return -EINVAL;
471 if (dsp->size % 4)
472 return -EINVAL;
467 473
468 /* inform mixart about the size of the file */ 474 /* inform mixart about the size of the file */
469 writel_be( dsp->size, MIXART_MEM( mgr, MIXART_PSEUDOREG_DXLX_SIZE_OFFSET )); 475 writel_be( dsp->size, MIXART_MEM( mgr, MIXART_PSEUDOREG_DXLX_SIZE_OFFSET ));
@@ -480,7 +486,8 @@ static int mixart_dsp_load(struct mixart_mgr* mgr, int index, const struct firmw
480 486
481 /* get the address where to write the file */ 487 /* get the address where to write the file */
482 val = readl_be( MIXART_MEM( mgr, MIXART_PSEUDOREG_DXLX_BASE_ADDR_OFFSET )); 488 val = readl_be( MIXART_MEM( mgr, MIXART_PSEUDOREG_DXLX_BASE_ADDR_OFFSET ));
483 snd_assert(val != 0, return -EINVAL); 489 if (!val)
490 return -EINVAL;
484 491
485 /* copy daughterboard xilinx code */ 492 /* copy daughterboard xilinx code */
486 memcpy_toio( MIXART_MEM( mgr, val), dsp->data, dsp->size); 493 memcpy_toio( MIXART_MEM( mgr, val), dsp->data, dsp->size);