Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[cascardo/linux.git] / arch / blackfin / mach-bf561 / coreb.c
index c6a4c8f..8a2543c 100644 (file)
@@ -18,9 +18,9 @@
 #include <linux/miscdevice.h>
 #include <linux/module.h>
 
-#define CMD_COREB_START                2
-#define CMD_COREB_STOP         3
-#define CMD_COREB_RESET                4
+#define CMD_COREB_START                _IO('b', 0)
+#define CMD_COREB_STOP         _IO('b', 1)
+#define CMD_COREB_RESET                _IO('b', 2)
 
 static long
 coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
@@ -29,10 +29,10 @@ coreb_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
        switch (cmd) {
        case CMD_COREB_START:
-               bfin_write_SICA_SYSCR(bfin_read_SICA_SYSCR() & ~0x0020);
+               bfin_write_SYSCR(bfin_read_SYSCR() & ~0x0020);
                break;
        case CMD_COREB_STOP:
-               bfin_write_SICA_SYSCR(bfin_read_SICA_SYSCR() | 0x0020);
+               bfin_write_SYSCR(bfin_read_SYSCR() | 0x0020);
                bfin_write_SICB_SYSCR(bfin_read_SICB_SYSCR() | 0x0080);
                break;
        case CMD_COREB_RESET:
@@ -59,18 +59,8 @@ static struct miscdevice coreb_dev = {
        .name  = "coreb",
        .fops  = &coreb_fops,
 };
-
-static int __init bf561_coreb_init(void)
-{
-       return misc_register(&coreb_dev);
-}
-module_init(bf561_coreb_init);
-
-static void __exit bf561_coreb_exit(void)
-{
-       misc_deregister(&coreb_dev);
-}
-module_exit(bf561_coreb_exit);
+module_misc_device(coreb_dev);
 
 MODULE_AUTHOR("Bas Vermeulen <bvermeul@blackstar.xs4all.nl>");
 MODULE_DESCRIPTION("BF561 Core B Support");
+MODULE_LICENSE("GPL");