Skip to contentSkip to conversation

staging: xgifb: Add compilation conditionals

PATCH In review Javier Martinez Canillas 2 participants 2 messages Sep 4, 2010 – Sep 5, 2010 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 2/4 staging: xgifb: Add compilation conditionals

---
 drivers/staging/xgifb/XGI_main.h    |    2 ++
 drivers/staging/xgifb/XGI_main_26.c |    6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)
drivers/staging/xgifb/XGI_main.h +2 -0
index 72448e8..93837f3 100644
@@ -345,7 +345,9 @@ static int XGIfb_userom = 0;
 static int XGIfb_registered;
 static int XGIfb_tvmode = 0;
 static int XGIfb_mem = 0;
+#ifndef MODULE
 static int XGIfb_pdc = 0;
+#endif
 static int enable_dstn = 0;
 static int XGIfb_ypan = -1;
 
drivers/staging/xgifb/XGI_main_26.c +6 -0
index 3c80191..2cba4c4 100644
@@ -843,6 +843,7 @@ static int XGIfb_validate_mode(int myindex)
 
 }
 
+#ifndef MODULE
 static void XGIfb_search_crt2type(const char *name)
 {
 	int i = 0;
@@ -861,7 +862,9 @@ static void XGIfb_search_crt2type(const char *name)
 	if(XGIfb_crt2type < 0)
 		printk(KERN_INFO "XGIfb: Invalid CRT2 type: %s\n", name);
 }
+#endif
 
+#ifndef MODULE
 static void XGIfb_search_queuemode(const char *name)
 {
 	int i = 0;
@@ -879,6 +882,7 @@ static void XGIfb_search_queuemode(const char *name)
 	if (XGIfb_queuemode < 0)
 		printk(KERN_INFO "XGIfb: Invalid queuemode type: %s\n", name);
 }
+#endif
 
 static u8 XGIfb_search_refresh_rate(unsigned int rate)
 {
@@ -926,6 +930,7 @@ static u8 XGIfb_search_refresh_rate(unsigned int rate)
 	}
 }
 
+#ifndef MODULE
 static void XGIfb_search_tvstd(const char *name)
 {
 	int i = 0;
@@ -941,6 +946,7 @@ static void XGIfb_search_tvstd(const char *name)
 		i++;
 	}
 }
+#endif
 
 static unsigned char XGIfb_bridgeisslave(void)
 {
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 12 lines · Javier Martinez Canillas
---
 drivers/staging/xgifb/XGI_main.h    |    2 ++
 drivers/staging/xgifb/XGI_main_26.c |    6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)
drivers/staging/xgifb/XGI_main.h +0 -0
index 72448e8..93837f3 100644

drivers/staging/xgifb/XGI_main.h static int XGIfb_userom = 0; · line 350

Quoted 6 lines
drivers/staging/xgifb/XGI_main.h +2 -0
@@ -345,7 +345,9 @@ static int XGIfb_userom = 0;
 static int XGIfb_registered;
 static int XGIfb_tvmode = 0;
 static int XGIfb_mem = 0;
+#ifndef MODULE
 static int XGIfb_pdc = 0;
+#endif

Ick, no, don't add conditionals, fix the code to not need such nonsense.

thanks,

greg k-h