30 lines
1.6 KiB
Diff
Executable file
30 lines
1.6 KiB
Diff
Executable file
--- svgalib-1.9.25-original/kernel/svgalib_helper/kernel26compat.h 2008-12-26 15:52:24.000000000 +0100
|
|
+++ 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) \
|