#include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/crc32.h> /* For counting font checksums */
+#include <linux/uaccess.h>
 #include <asm/fb.h>
 #include <asm/irq.h>
 
        }
 }
 
-static int fbcon_event_notify(struct notifier_block *self,
-                             unsigned long action, void *data)
+int fbcon_set_con2fb_map_ioctl(void __user *argp)
 {
-       struct fb_event *event = data;
-       struct fb_info *info = event->info;
-       struct fb_con2fbmap *con2fb;
-       int idx, ret = 0;
+       struct fb_con2fbmap con2fb;
+       int ret;
 
-       switch(action) {
-       case FB_EVENT_SET_CONSOLE_MAP:
-               /* called with console lock held */
-               con2fb = event->data;
-               ret = set_con2fb_map(con2fb->console - 1,
-                                    con2fb->framebuffer, 1);
-               break;
-       case FB_EVENT_GET_CONSOLE_MAP:
-               con2fb = event->data;
-               con2fb->framebuffer = con2fb_map[con2fb->console - 1];
-               break;
+       if (copy_from_user(&con2fb, argp, sizeof(con2fb)))
+               return -EFAULT;
+       if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
+               return -EINVAL;
+       if (con2fb.framebuffer >= FB_MAX)
+               return -EINVAL;
+       if (!registered_fb[con2fb.framebuffer])
+               request_module("fb%d", con2fb.framebuffer);
+       if (!registered_fb[con2fb.framebuffer]) {
+               return -EINVAL;
        }
+
+       console_lock();
+       ret = set_con2fb_map(con2fb.console - 1,
+                            con2fb.framebuffer, 1);
+       console_unlock();
+
        return ret;
 }
 
+int fbcon_get_con2fb_map_ioctl(void __user *argp)
+{
+       struct fb_con2fbmap con2fb;
+
+       if (copy_from_user(&con2fb, argp, sizeof(con2fb)))
+               return -EFAULT;
+       if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
+               return -EINVAL;
+
+       console_lock();
+       con2fb.framebuffer = con2fb_map[con2fb.console - 1];
+       console_unlock();
+
+       return copy_to_user(argp, &con2fb, sizeof(con2fb)) ? -EFAULT : 0;
+}
+
 /*
  *  The console `switch' structure for the frame buffer based console
  */
        .con_debug_leave        = fbcon_debug_leave,
 };
 
-static struct notifier_block fbcon_event_notifier = {
-       .notifier_call  = fbcon_event_notify,
-};
-
 static ssize_t store_rotate(struct device *device,
                            struct device_attribute *attr, const char *buf,
                            size_t count)
        int i;
 
        console_lock();
-       fb_register_client(&fbcon_event_notifier);
        fbcon_device = device_create(fb_class, NULL, MKDEV(0, 0), NULL,
                                     "fbcon");
 
 void __exit fb_console_exit(void)
 {
        console_lock();
-       fb_unregister_client(&fbcon_event_notifier);
        fbcon_deinit_device();
        device_destroy(fb_class, MKDEV(0, 0));
        fbcon_exit();
 
        struct fb_ops *fb;
        struct fb_var_screeninfo var;
        struct fb_fix_screeninfo fix;
-       struct fb_con2fbmap con2fb;
        struct fb_cmap cmap_from;
        struct fb_cmap_user cmap;
-       struct fb_event event;
        void __user *argp = (void __user *)arg;
        long ret = 0;
 
                ret = -EINVAL;
                break;
        case FBIOGET_CON2FBMAP:
-               if (copy_from_user(&con2fb, argp, sizeof(con2fb)))
-                       return -EFAULT;
-               if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
-                       return -EINVAL;
-               con2fb.framebuffer = -1;
-               event.data = &con2fb;
-               lock_fb_info(info);
-               event.info = info;
-               fb_notifier_call_chain(FB_EVENT_GET_CONSOLE_MAP, &event);
-               unlock_fb_info(info);
-               ret = copy_to_user(argp, &con2fb, sizeof(con2fb)) ? -EFAULT : 0;
+               ret = fbcon_get_con2fb_map_ioctl(argp);
                break;
        case FBIOPUT_CON2FBMAP:
-               if (copy_from_user(&con2fb, argp, sizeof(con2fb)))
-                       return -EFAULT;
-               if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES)
-                       return -EINVAL;
-               if (con2fb.framebuffer >= FB_MAX)
-                       return -EINVAL;
-               if (!registered_fb[con2fb.framebuffer])
-                       request_module("fb%d", con2fb.framebuffer);
-               if (!registered_fb[con2fb.framebuffer]) {
-                       ret = -EINVAL;
-                       break;
-               }
-               event.data = &con2fb;
-               console_lock();
-               lock_fb_info(info);
-               event.info = info;
-               ret = fb_notifier_call_chain(FB_EVENT_SET_CONSOLE_MAP, &event);
-               unlock_fb_info(info);
-               console_unlock();
+               ret = fbcon_set_con2fb_map_ioctl(argp);
                break;
        case FBIOBLANK:
                console_lock();
 
 void fbcon_fb_blanked(struct fb_info *info, int blank);
 void fbcon_update_vcs(struct fb_info *info, bool all);
 void fbcon_remap_all(struct fb_info *info);
+int fbcon_set_con2fb_map_ioctl(void __user *argp);
+int fbcon_get_con2fb_map_ioctl(void __user *argp);
 #else
 static inline void fb_console_init(void) {}
 static inline void fb_console_exit(void) {}
 static inline void fbcon_fb_blanked(struct fb_info *info, int blank) {}
 static inline void fbcon_update_vcs(struct fb_info *info, bool all) {}
 static inline void fbcon_remap_all(struct fb_info *info) {}
+static inline int fbcon_set_con2fb_map_ioctl(void __user *argp) { return 0; }
+static inline int fbcon_get_con2fb_map_ioctl(void __user *argp) { return 0; }
 #endif
 
 #endif /* _LINUX_FBCON_H */