diff options
author | Jean Delvare <khali@linux-fr.org> | 2008-04-28 05:15:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-28 11:58:38 -0400 |
commit | b0313f89672eddf0188dac96bb8f83135510a45c (patch) | |
tree | f3e926c582c4bf28276ffaa79e735a79c3cf899f /drivers/video/aty | |
parent | e7a18c9c86d14247b514157aae60326d45695476 (diff) |
radeonfb: fix debug option
Fix CONFIG_FB_RADEON_DEBUG. DEBUG must be defined before including any kernel
header, otherwise dev_dbg() resolves to a no-op. Also, when debugging is
disabled, don't set DEBUG at all instead of setting it to 0, to comply with
what the kernel headers expect.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
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>
Diffstat (limited to 'drivers/video/aty')
-rw-r--r-- | drivers/video/aty/radeon_base.c | 3 | ||||
-rw-r--r-- | drivers/video/aty/radeon_i2c.c | 3 | ||||
-rw-r--r-- | drivers/video/aty/radeon_monitor.c | 2 | ||||
-rw-r--r-- | drivers/video/aty/radeonfb.h | 12 |
4 files changed, 10 insertions, 10 deletions
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 48e60cbc36c5..10f32c83c96a 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
@@ -52,6 +52,8 @@ | |||
52 | 52 | ||
53 | #define RADEON_VERSION "0.2.0" | 53 | #define RADEON_VERSION "0.2.0" |
54 | 54 | ||
55 | #include "radeonfb.h" | ||
56 | |||
55 | #include <linux/module.h> | 57 | #include <linux/module.h> |
56 | #include <linux/moduleparam.h> | 58 | #include <linux/moduleparam.h> |
57 | #include <linux/kernel.h> | 59 | #include <linux/kernel.h> |
@@ -92,7 +94,6 @@ | |||
92 | 94 | ||
93 | #include "../edid.h" // MOVE THAT TO include/video | 95 | #include "../edid.h" // MOVE THAT TO include/video |
94 | #include "ati_ids.h" | 96 | #include "ati_ids.h" |
95 | #include "radeonfb.h" | ||
96 | 97 | ||
97 | #define MAX_MAPPED_VRAM (2048*2048*4) | 98 | #define MAX_MAPPED_VRAM (2048*2048*4) |
98 | #define MIN_MAPPED_VRAM (1024*768*1) | 99 | #define MIN_MAPPED_VRAM (1024*768*1) |
diff --git a/drivers/video/aty/radeon_i2c.c b/drivers/video/aty/radeon_i2c.c index 7db9de681716..5254c7627a5a 100644 --- a/drivers/video/aty/radeon_i2c.c +++ b/drivers/video/aty/radeon_i2c.c | |||
@@ -1,3 +1,5 @@ | |||
1 | #include "radeonfb.h" | ||
2 | |||
1 | #include <linux/module.h> | 3 | #include <linux/module.h> |
2 | #include <linux/kernel.h> | 4 | #include <linux/kernel.h> |
3 | #include <linux/delay.h> | 5 | #include <linux/delay.h> |
@@ -11,7 +13,6 @@ | |||
11 | #include <asm/io.h> | 13 | #include <asm/io.h> |
12 | 14 | ||
13 | #include <video/radeon.h> | 15 | #include <video/radeon.h> |
14 | #include "radeonfb.h" | ||
15 | #include "../edid.h" | 16 | #include "../edid.h" |
16 | 17 | ||
17 | static void radeon_gpio_setscl(void* data, int state) | 18 | static void radeon_gpio_setscl(void* data, int state) |
diff --git a/drivers/video/aty/radeon_monitor.c b/drivers/video/aty/radeon_monitor.c index 2030ed813429..4f756888dcd3 100644 --- a/drivers/video/aty/radeon_monitor.c +++ b/drivers/video/aty/radeon_monitor.c | |||
@@ -481,7 +481,7 @@ void __devinit radeon_probe_screens(struct radeonfb_info *rinfo, | |||
481 | 481 | ||
482 | RTRACE("Starting monitor auto detection...\n"); | 482 | RTRACE("Starting monitor auto detection...\n"); |
483 | 483 | ||
484 | #if DEBUG && defined(CONFIG_FB_RADEON_I2C) | 484 | #if defined(DEBUG) && defined(CONFIG_FB_RADEON_I2C) |
485 | { | 485 | { |
486 | u8 *EDIDs[4] = { NULL, NULL, NULL, NULL }; | 486 | u8 *EDIDs[4] = { NULL, NULL, NULL, NULL }; |
487 | int mon_types[4] = {MT_NONE, MT_NONE, MT_NONE, MT_NONE}; | 487 | int mon_types[4] = {MT_NONE, MT_NONE, MT_NONE, MT_NONE}; |
diff --git a/drivers/video/aty/radeonfb.h b/drivers/video/aty/radeonfb.h index 5eac1ce52e72..8215ca0555c2 100644 --- a/drivers/video/aty/radeonfb.h +++ b/drivers/video/aty/radeonfb.h | |||
@@ -1,6 +1,10 @@ | |||
1 | #ifndef __RADEONFB_H__ | 1 | #ifndef __RADEONFB_H__ |
2 | #define __RADEONFB_H__ | 2 | #define __RADEONFB_H__ |
3 | 3 | ||
4 | #ifdef CONFIG_FB_RADEON_DEBUG | ||
5 | #define DEBUG 1 | ||
6 | #endif | ||
7 | |||
4 | #include <linux/module.h> | 8 | #include <linux/module.h> |
5 | #include <linux/kernel.h> | 9 | #include <linux/kernel.h> |
6 | #include <linux/sched.h> | 10 | #include <linux/sched.h> |
@@ -367,13 +371,7 @@ struct radeonfb_info { | |||
367 | /* | 371 | /* |
368 | * Debugging stuffs | 372 | * Debugging stuffs |
369 | */ | 373 | */ |
370 | #ifdef CONFIG_FB_RADEON_DEBUG | 374 | #ifdef DEBUG |
371 | #define DEBUG 1 | ||
372 | #else | ||
373 | #define DEBUG 0 | ||
374 | #endif | ||
375 | |||
376 | #if DEBUG | ||
377 | #define RTRACE printk | 375 | #define RTRACE printk |
378 | #else | 376 | #else |
379 | #define RTRACE if(0) printk | 377 | #define RTRACE if(0) printk |