lkml.org 
[lkml]   [2007]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[KJ][patch 3/3] VIDC20: use abs() from kernel.h instead of own definition
From: Andre Haupt <andre@finow14.de>
Signed-off-by: Andre Haupt <andre@finow14.de>
---
Index: linus/sound/oss/vidc.c
===================================================================
--- linus.orig/sound/oss/vidc.c 2007-08-30 11:57:13.000000000 +0200
+++ linus/sound/oss/vidc.c 2007-08-30 11:57:53.000000000 +0200
@@ -185,8 +185,6 @@ static unsigned int vidc_audio_set_forma
return vidc_audio_format;
}

-#define my_abs(i) ((i)<0 ? -(i) : (i))
-
static int vidc_audio_set_speed(int dev, int rate)
{
if (rate) {
@@ -214,8 +212,8 @@ static int vidc_audio_set_speed(int dev,
rate_ext = VIDC_SOUND_CLOCK_EXT / hwrate_ext;

/* Chose between external and internal clock */
- diff_int = my_abs(rate_ext-rate);
- diff_ext = my_abs(rate_int-rate);
+ diff_int = abs(rate_ext-rate);
+ diff_ext = abs(rate_int-rate);
if (diff_ext < diff_int) {
/*printk("VIDC: external %d %d %d\n", rate, rate_ext, hwrate_ext);*/
hwrate=hwrate_ext;
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-08-30 12:47    [W:0.041 / U:0.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site