Use module_param instead of adding our own sysfs file. This reduce the code and
removes a warning. Moreover, using a module_param is a more logical way to 
achieve this purpose.

Now that it's a module_param, there's no more a real need for setting a default
setting through Kconfig. So, I'm removing the FB_S3C2410_DEBUG entry.

---
 drivers/video/Kconfig     |    6 	0 +	6 -	0 !
 drivers/video/s3c2410fb.c |   49 	7 +	42 -	0 !
 2 files changed, 7 insertions(+), 48 deletions(-)

Index: linux-2.6/drivers/video/s3c2410fb.c
===================================================================
--- linux-2.6.orig/drivers/video/s3c2410fb.c	2006-12-21 00:37:14.000000000 +0100
+++ linux-2.6/drivers/video/s3c2410fb.c	2006-12-21 00:42:33.000000000 +0100
@@ -86,6 +86,7 @@
 #include <linux/wait.h>
 #include <linux/platform_device.h>
 #include <linux/clk.h>
+#include <linux/moduleparam.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
@@ -106,13 +107,13 @@
 static struct s3c2410fb_mach_info *mach_info;
 
 /* Debugging stuff */
-#ifdef CONFIG_FB_S3C2410_DEBUG
-static int debug	   = 1;
-#else
-static int debug	   = 0;
-#endif
+static int fb_debug;
+
+module_param(fb_debug, int, S_IRUSR|S_IWUSR);
+MODULE_PARM_DESC(fb_debug,"Enable debug messages");
+
+#define dprintk(msg...)	if (fb_debug) { printk(KERN_DEBUG "s3c2410fb: " msg); }
 
-#define dprintk(msg...)	if (debug) { printk(KERN_DEBUG "s3c2410fb: " msg); }
 
 /* useful functions */
 
@@ -578,39 +579,6 @@ static int s3c2410fb_blank(int blank_mod
 	return 0;
 }
 
-static int s3c2410fb_debug_show(struct device *dev, struct device_attribute *attr, char *buf)
-{
-	return snprintf(buf, PAGE_SIZE, "%s\n", debug ? "on" : "off");
-}
-static int s3c2410fb_debug_store(struct device *dev, struct device_attribute *attr,
-					   const char *buf, size_t len)
-{
-	if (mach_info == NULL)
-		return -EINVAL;
-
-	if (len < 1)
-		return -EINVAL;
-
-	if (strnicmp(buf, "on", 2) == 0 ||
-	    strnicmp(buf, "1", 1) == 0) {
-		debug = 1;
-		printk(KERN_DEBUG "s3c2410fb: Debug On");
-	} else if (strnicmp(buf, "off", 3) == 0 ||
-		   strnicmp(buf, "0", 1) == 0) {
-		debug = 0;
-		printk(KERN_DEBUG "s3c2410fb: Debug Off");
-	} else {
-		return -EINVAL;
-	}
-
-	return len;
-}
-
-
-static DEVICE_ATTR(debug, 0666,
-		   s3c2410fb_debug_show,
-		   s3c2410fb_debug_store);
-
 static struct fb_ops s3c2410fb_ops = {
 	.owner		= THIS_MODULE,
 	.fb_check_var	= s3c2410fb_check_var,
@@ -899,9 +867,6 @@ static int __init s3c2410fb_probe(struct
 		goto free_video_memory;
 	}
 
-	/* create device files */
-	device_create_file(&pdev->dev, &dev_attr_debug);
-
 	printk(KERN_INFO "fb%d: %s frame buffer device\n",
 		fbinfo->node, fbinfo->fix.id);
 
Index: linux-2.6/drivers/video/Kconfig
===================================================================
--- linux-2.6.orig/drivers/video/Kconfig	2006-12-21 00:37:14.000000000 +0100
+++ linux-2.6/drivers/video/Kconfig	2006-12-21 00:37:40.000000000 +0100
@@ -1593,12 +1593,6 @@ config FB_S3C2410
 	  say M here and read <file:Documentation/modules.txt>.
 
 	  If unsure, say N.
-config FB_S3C2410_DEBUG
-	bool "S3C2410 lcd debug messages"
-	depends on FB_S3C2410
-	help
-	  Turn on debugging messages. Note that you can set/unset at run time
-	  through sysfs
 
 config FB_PNX4008_DUM
 	tristate "Display Update Module support on Philips PNX4008 board"

