]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: xgifb: Remove XGIFAIL() macro and its calls.
authorMiguel Gómez <magomez@igalia.com>
Mon, 18 Jun 2012 11:12:03 +0000 (13:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Jun 2012 00:20:20 +0000 (17:20 -0700)
XGIFAIL() prints a message and returns a value, but it's used only in one
place. Better remove it and replace the call with the macro content.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xgifb/XGI_main.h
drivers/staging/xgifb/XGI_main_26.c

index ce18f8c98b2da516a7ee8f8aa2b34df2236301d2..be6bb7d0971e54a832af8e23d5dd2a4be331ee42 100644 (file)
@@ -4,8 +4,6 @@
 #include "XGIfb.h"
 #include "vb_def.h"
 
-#define XGIFAIL(x) do { printk(x "\n"); return -EINVAL; } while (0)
-
 #ifndef PCI_DEVICE_ID_XGI_42
 #define PCI_DEVICE_ID_XGI_42      0x042
 #endif
index a45a497115edb7d17873f318b41225562993e0b9..58cddb40f314e03cd169d61ab086d1eb9cefc359 100644 (file)
@@ -1376,8 +1376,10 @@ static int XGIfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
                vtotal = var->upper_margin + var->yres + var->lower_margin
                                + var->vsync_len;
 
-       if (!(htotal) || !(vtotal))
-               XGIFAIL("XGIfb: no valid timing data");
+       if (!(htotal) || !(vtotal)) {
+               pr_debug("XGIfb: no valid timing data\n");
+               return -EINVAL;
+       }
 
        if (var->pixclock && htotal && vtotal) {
                drate = 1000000000 / var->pixclock;