aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa
diff options
context:
space:
mode:
authorPeter Eriksen <s022018@student.dtu.dk>2007-01-29 08:45:53 -0500
committerJaroslav Kysela <perex@suse.cz>2007-02-09 03:03:13 -0500
commit377a4f7ea35d7d6cc05faea7030522d93435dc11 (patch)
treeea5f77402cd05c2df7288e8abd00982355e5ac42 /sound/isa
parentcd7509a43c3047a6339484e5009c2db7ee4c7a51 (diff)
[ALSA] sound/isa/gus/gus_main.c: Use abs() instead of x < 0 ? -x : x.
Signed-off-by: Peter Eriksen <s022018@student.dtu.dk> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/isa')
-rw-r--r--sound/isa/gus/gus_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c
index b680fddf0d74..8ced5e81b9a7 100644
--- a/sound/isa/gus/gus_main.c
+++ b/sound/isa/gus/gus_main.c
@@ -294,10 +294,10 @@ static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches)
294 gus->mix_cntrl_reg |= 4; /* enable MIC */ 294 gus->mix_cntrl_reg |= 4; /* enable MIC */
295 } 295 }
296 dma1 = gus->gf1.dma1; 296 dma1 = gus->gf1.dma1;
297 dma1 = dma1 < 0 ? -dma1 : dma1; 297 dma1 = abs(dma1);
298 dma1 = dmas[dma1 & 7]; 298 dma1 = dmas[dma1 & 7];
299 dma2 = gus->gf1.dma2; 299 dma2 = gus->gf1.dma2;
300 dma2 = dma2 < 0 ? -dma2 : dma2; 300 dma2 = abs(dma2);
301 dma2 = dmas[dma2 & 7]; 301 dma2 = dmas[dma2 & 7];
302 dma1 |= gus->equal_dma ? 0x40 : (dma2 << 3); 302 dma1 |= gus->equal_dma ? 0x40 : (dma2 << 3);
303 303
@@ -306,7 +306,7 @@ static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches)
306 return -EINVAL; 306 return -EINVAL;
307 } 307 }
308 irq = gus->gf1.irq; 308 irq = gus->gf1.irq;
309 irq = irq < 0 ? -irq : irq; 309 irq = abs(irq);
310 irq = irqs[irq & 0x0f]; 310 irq = irqs[irq & 0x0f];
311 if (irq == 0) { 311 if (irq == 0) {
312 snd_printk(KERN_ERR "Error! IRQ isn't defined.\n"); 312 snd_printk(KERN_ERR "Error! IRQ isn't defined.\n");