void-packages/srcpkgs/nvidia304/files/kernel_4.11.patch
2017-07-28 11:43:18 +02:00

44 lines
763 B
Diff

--- kernel/nv-drm.c.orig
+++ kernel/nv-drm.c
@@ -22,6 +22,8 @@
#include <drm/drm_gem.h>
#endif
+#include <linux/version.h>
+
extern nv_linux_state_t *nv_linux_devices;
static int nv_drm_load(
@@ -42,7 +44,11 @@
return -ENODEV;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
static int nv_drm_unload(
+#else
+static void nv_drm_unload(
+#endif
struct drm_device *dev
)
{
@@ -52,11 +58,19 @@
{
if (nvl->dev == dev->pdev)
{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
return 0;
+#else
+ return;
+#endif
}
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
return -ENODEV;
+#else
+ return;
+#endif
}
static const struct file_operations nv_drm_fops = {