From: Peter Eriksen Date: Mon, 29 Jan 2007 13:45:53 +0000 (+0100) Subject: [ALSA] sound/isa/gus/gus_main.c: Use abs() instead of x < 0 ? -x : x. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=377a4f7ea35d7d6cc05faea7030522d93435dc11;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [ALSA] sound/isa/gus/gus_main.c: Use abs() instead of x < 0 ? -x : x. Signed-off-by: Peter Eriksen Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai Signed-off-by: Jaroslav Kysela --- 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) gus->mix_cntrl_reg |= 4; /* enable MIC */ } dma1 = gus->gf1.dma1; - dma1 = dma1 < 0 ? -dma1 : dma1; + dma1 = abs(dma1); dma1 = dmas[dma1 & 7]; dma2 = gus->gf1.dma2; - dma2 = dma2 < 0 ? -dma2 : dma2; + dma2 = abs(dma2); dma2 = dmas[dma2 & 7]; dma1 |= gus->equal_dma ? 0x40 : (dma2 << 3); @@ -306,7 +306,7 @@ static int snd_gus_init_dma_irq(struct snd_gus_card * gus, int latches) return -EINVAL; } irq = gus->gf1.irq; - irq = irq < 0 ? -irq : irq; + irq = abs(irq); irq = irqs[irq & 0x0f]; if (irq == 0) { snd_printk(KERN_ERR "Error! IRQ isn't defined.\n");