Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save kirrmann/0cf988bd1eb0f6cb72ed to your computer and use it in GitHub Desktop.

Select an option

Save kirrmann/0cf988bd1eb0f6cb72ed to your computer and use it in GitHub Desktop.
VirtualBox 4.3.12 modules patch for Fedora Linux kernel 3.16-rc
diff -Nur vboxsf/regops.c vboxsf/regops.c
--- vboxsf/regops.c 2014-06-24 13:04:56.176591179 +0200
+++ vboxsf/regops.c 2014-06-23 09:19:50.695515003 +0200
@@ -574,8 +574,13 @@
# else
.sendfile = generic_file_sendfile,
# endif
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
+ .read_iter = generic_file_read_iter,
+ .write_iter = generic_file_write_iter,
+# else
.aio_read = generic_file_aio_read,
.aio_write = generic_file_aio_write,
+# endif
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 35)
.fsync = noop_fsync,
# else
diff -Nur vboxvideo/vboxvideo_drm.c vboxvideo/vboxvideo_drm.c
--- vboxvideo/vboxvideo_drm.c 2014-06-24 13:04:56.176591179 +0200
+++ vboxvideo/vboxvideo_drm.c 2014-06-24 12:54:57.546306297 +0200
@@ -156,11 +156,13 @@
.fops = &driver_fops,
#endif
#ifndef DRIVER_BUS_PCI
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
.pci_driver =
{
.name = DRIVER_NAME,
.id_table = pciidlist,
},
+ #endif
#endif
.name = DRIVER_NAME,
.desc = DRIVER_DESC,
@@ -170,7 +172,7 @@
.patchlevel = DRIVER_PATCHLEVEL,
};
-#ifdef DRIVER_BUS_PCI
+#if defined(DRIVER_BUS_PCI) || LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0)
static struct pci_driver pci_driver =
{
.name = DRIVER_NAME,
@@ -180,7 +182,7 @@
static int __init vboxvideo_init(void)
{
-#ifndef DRIVER_BUS_PCI
+#if !defined(DRIVER_BUS_PCI) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
return drm_init(&driver);
#else
return drm_pci_init(&driver, &pci_driver);
@@ -189,7 +191,7 @@
static void __exit vboxvideo_exit(void)
{
-#ifndef DRIVER_BUS_PCI
+#if !defined(DRIVER_BUS_PCI) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
drm_exit(&driver);
#else
drm_pci_exit(&driver, &pci_driver);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment