summarylogtreecommitdiffstats
path: root/svgalib-1.9.25-linux2.6.28.patch
diff options
context:
space:
mode:
Diffstat (limited to 'svgalib-1.9.25-linux2.6.28.patch')
-rw-r--r--svgalib-1.9.25-linux2.6.28.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/svgalib-1.9.25-linux2.6.28.patch b/svgalib-1.9.25-linux2.6.28.patch
new file mode 100644
index 000000000000..55430281776b
--- /dev/null
+++ b/svgalib-1.9.25-linux2.6.28.patch
@@ -0,0 +1,30 @@
+--- src/svgalib-1.9.25/kernel/svgalib_helper/kernel26compat.h 2008-12-26 15:52:24.000000000 +0100
++++ src/svgalib-1.9.25/kernel/svgalib_helper/kernel26compat.h 2008-12-26 16:48:46.000000000 +0100
+@@ -128,7 +128,7 @@
+ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
+ _name);
+ /* 2.6.27 changed device_create to device_create_drvdata */
+-#else
++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,28)
+ # define SLH_SYSFS_ADD_CONTROL \
+ device_create_drvdata(svgalib_helper_class, NULL, \
+ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
+@@ -139,6 +139,18 @@
+ &sh_pci_devs[_minor]->dev->dev, \
+ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
+ "%s%d", _name, _minor);
++/* 2.6.28 changed device_create_drvdata back to device_create */
++#else
++# define SLH_SYSFS_ADD_CONTROL \
++ device_create(svgalib_helper_class, NULL, \
++ MKDEV(SVGALIB_HELPER_MAJOR, 0), NULL, \
++ "%s%d", "svga", 0);
++
++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \
++ device_create(svgalib_helper_class, \
++ &sh_pci_devs[_minor]->dev->dev, \
++ MKDEV(SVGALIB_HELPER_MAJOR, _minor), NULL, \
++ "%s%d", _name, _minor);
+ #endif
+
+ # define SLH_SYSFS_REMOVE_DEVICE(i) \