tridentfb: convert is_blade and is_xp macros into functions
authorKrzysztof Helt <krzysztof.h1@wp.pl>
Thu, 24 Jul 2008 04:30:53 +0000 (21:30 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 24 Jul 2008 17:47:35 +0000 (10:47 -0700)
This patch converts the is_blade() and is_xp() macros into local functions.

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/video/tridentfb.c
include/video/trident.h

index 604b10a590daa516cce589bfb80d943d7c79538d..e87f77093ec1dbd568b6750e601cfc91e941aeea 100644 (file)
@@ -78,6 +78,25 @@ MODULE_PARM_DESC(fp, "Define if flatpanel is connected");
 module_param(crt, int, 0);
 MODULE_PARM_DESC(crt, "Define if CRT is connected");
 
+static int is_blade(int id)
+{
+       return  (id == BLADE3D) ||
+               (id == CYBERBLADEE4) ||
+               (id == CYBERBLADEi7) ||
+               (id == CYBERBLADEi7D) ||
+               (id == CYBERBLADEi1) ||
+               (id == CYBERBLADEi1D) ||
+               (id == CYBERBLADEAi1) ||
+               (id == CYBERBLADEAi1D);
+}
+
+static int is_xp(int id)
+{
+       return  (id == CYBERBLADEXPAi1) ||
+               (id == CYBERBLADEXPm8) ||
+               (id == CYBERBLADEXPm16);
+}
+
 static int is3Dchip(int id)
 {
        return ((id == BLADE3D) || (id == CYBERBLADEE4) ||
index d3dd737a1ba8017f994e4fb6e970506fa114fa14..9c3670b289062cfd32c2a9ab32a063308a1fc293 100644 (file)
 #define CYBERBLADEXPm8  0x9910
 #define CYBERBLADEXPm16 0x9930
 
-/* acceleration families */
-#define IMAGE  0
-#define BLADE  1
-#define XP     2
-
-#define is_image(id)   
-#define is_xp(id)      ((id == CYBERBLADEXPAi1) ||\
-                        (id == CYBERBLADEXPm8) ||\
-                        (id == CYBERBLADEXPm16)) 
-
-#define is_blade(id)   ((id == BLADE3D) ||\
-                        (id == CYBERBLADEE4) ||\
-                        (id == CYBERBLADEi7) ||\
-                        (id == CYBERBLADEi7D) ||\
-                        (id == CYBERBLADEi1) ||\
-                        (id == CYBERBLADEi1D) ||\
-                        (id == CYBERBLADEAi1) ||\
-                        (id == CYBERBLADEAi1D))
-
 /* these defines are for 'lcd' variable */
 #define LCD_STRETCH    0
 #define LCD_CENTER     1