1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
--- 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) \
|