1 #include <linux/kernel.h>
2 #include <linux/module.h>
3 #include <linux/proc_fs.h>
4 #include <asm/processor.h>
5 #include <asm/uaccess.h>
8 MODULE_AUTHOR("Mark Calderbank");
10 static ssize_t do_write(struct file *file,
19 for (i=0; i<3 && i<length; i++)
22 if (c < '0' || c > '9') break;
23 if (i == 0) border = 0; else border *= 10;
27 if (border != -1) asm volatile("mtdcr 0x17b,%0" : : "r" (border));
31 static struct file_operations f_ops =
39 struct proc_dir_entry *entry;
40 entry = create_proc_entry("lbox_border", S_IWUSR, NULL);
41 if (!entry) return -EIO;
42 entry->proc_fops = &f_ops;
43 MOD_INC_USE_COUNT; /* Just prevent removal - simple */
47 void cleanup_module(void)
49 remove_proc_entry("lbox_border", NULL);
52 long __get_user_bad(void)