Commit b0313f89 authored by Jean Delvare's avatar Jean Delvare Committed by Linus Torvalds

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: default avatarJean Delvare <khali@linux-fr.org>
Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e7a18c9c
...@@ -52,6 +52,8 @@ ...@@ -52,6 +52,8 @@
#define RADEON_VERSION "0.2.0" #define RADEON_VERSION "0.2.0"
#include "radeonfb.h"
#include <linux/module.h> #include <linux/module.h>
#include <linux/moduleparam.h> #include <linux/moduleparam.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -92,7 +94,6 @@ ...@@ -92,7 +94,6 @@
#include "../edid.h" // MOVE THAT TO include/video #include "../edid.h" // MOVE THAT TO include/video
#include "ati_ids.h" #include "ati_ids.h"
#include "radeonfb.h"
#define MAX_MAPPED_VRAM (2048*2048*4) #define MAX_MAPPED_VRAM (2048*2048*4)
#define MIN_MAPPED_VRAM (1024*768*1) #define MIN_MAPPED_VRAM (1024*768*1)
......
#include "radeonfb.h"
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/delay.h> #include <linux/delay.h>
...@@ -11,7 +13,6 @@ ...@@ -11,7 +13,6 @@
#include <asm/io.h> #include <asm/io.h>
#include <video/radeon.h> #include <video/radeon.h>
#include "radeonfb.h"
#include "../edid.h" #include "../edid.h"
static void radeon_gpio_setscl(void* data, int state) static void radeon_gpio_setscl(void* data, int state)
......
...@@ -481,7 +481,7 @@ void __devinit radeon_probe_screens(struct radeonfb_info *rinfo, ...@@ -481,7 +481,7 @@ void __devinit radeon_probe_screens(struct radeonfb_info *rinfo,
RTRACE("Starting monitor auto detection...\n"); RTRACE("Starting monitor auto detection...\n");
#if DEBUG && defined(CONFIG_FB_RADEON_I2C) #if defined(DEBUG) && defined(CONFIG_FB_RADEON_I2C)
{ {
u8 *EDIDs[4] = { NULL, NULL, NULL, NULL }; u8 *EDIDs[4] = { NULL, NULL, NULL, NULL };
int mon_types[4] = {MT_NONE, MT_NONE, MT_NONE, MT_NONE}; int mon_types[4] = {MT_NONE, MT_NONE, MT_NONE, MT_NONE};
......
#ifndef __RADEONFB_H__ #ifndef __RADEONFB_H__
#define __RADEONFB_H__ #define __RADEONFB_H__
#ifdef CONFIG_FB_RADEON_DEBUG
#define DEBUG 1
#endif
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
...@@ -367,13 +371,7 @@ struct radeonfb_info { ...@@ -367,13 +371,7 @@ struct radeonfb_info {
/* /*
* Debugging stuffs * Debugging stuffs
*/ */
#ifdef CONFIG_FB_RADEON_DEBUG #ifdef DEBUG
#define DEBUG 1
#else
#define DEBUG 0
#endif
#if DEBUG
#define RTRACE printk #define RTRACE printk
#else #else
#define RTRACE if(0) printk #define RTRACE if(0) printk
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment