Index: /trunk/src/VBox/Additions/linux/drm/vbox_drv.c
===================================================================
--- /trunk/src/VBox/Additions/linux/drm/vbox_drv.c	(revision 52598)
+++ /trunk/src/VBox/Additions/linux/drm/vbox_drv.c	(revision 52599)
@@ -102,24 +102,4 @@
 };
 
-/* Intercept the old-style cursor IOCtl which does not pass the hot-spot to stop
- * the kernel from translating it to a new-style one with a zero hot-spot, which
- * we do not want. */
-static long vbox_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
-{
-    if (cmd != DRM_IOCTL_MODE_CURSOR)
-        return drm_ioctl(filp, cmd, arg);
-    return -EINVAL;
-}
-
-#ifdef CONFIG_COMPAT
-static long vbox_compat_ioctl(struct file *filp, unsigned int cmd, 
-                              unsigned long arg)
-{
-    if (cmd != DRM_IOCTL_MODE_CURSOR)
-        return drm_compat_ioctl(filp, cmd, arg);
-    return -EINVAL;
-}
-#endif
-
 static const struct file_operations vbox_fops =
 {
@@ -127,10 +107,12 @@
     .open = drm_open,
     .release = drm_release,
-    .unlocked_ioctl = vbox_ioctl,
+    .unlocked_ioctl = drm_ioctl,
     .mmap = vbox_mmap,
     .poll = drm_poll,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
     .fasync = drm_fasync,
+#endif
 #ifdef CONFIG_COMPAT
-    .compat_ioctl = vbox_compat_ioctl,
+    .compat_ioctl = drm_compat_ioctl,
 #endif
     .read = drm_read,
@@ -139,5 +121,5 @@
 static struct drm_driver driver =
 {
-    .driver_features = DRIVER_USE_MTRR | DRIVER_MODESET | DRIVER_GEM,
+    .driver_features = DRIVER_MODESET | DRIVER_GEM,
     .dev_priv_size = 0,
 
@@ -155,5 +137,4 @@
     .patchlevel = DRIVER_PATCHLEVEL,
 
-    .gem_init_object = vbox_gem_init_object,
     .gem_free_object = vbox_gem_free_object,
     .dumb_create = vbox_dumb_create,
Index: /trunk/src/VBox/Additions/linux/drm/vbox_drv.h
===================================================================
--- /trunk/src/VBox/Additions/linux/drm/vbox_drv.h	(revision 52598)
+++ /trunk/src/VBox/Additions/linux/drm/vbox_drv.h	(revision 52599)
@@ -180,4 +180,10 @@
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 15, 0)
+# define CRTC_FB(crtc) (crtc)->fb
+#else
+# define CRTC_FB(crtc) (crtc)->primary->fb
+#endif
+
 void vbox_framebuffer_dirty_rectangles(struct drm_framebuffer *fb,
                                        struct drm_clip_rect *pRects,
@@ -219,5 +225,4 @@
                 uint32_t handle);
 
-extern int vbox_gem_init_object(struct drm_gem_object *obj);
 extern void vbox_gem_free_object(struct drm_gem_object *obj);
 extern int vbox_dumb_mmap_offset(struct drm_file *file,
