SOURCES: svgalib-2.6.28.patch (NEW) - fix for 2.6.28

witekfl witekfl at pld-linux.org
Sun Jan 25 20:37:41 CET 2009


Author: witekfl                      Date: Sun Jan 25 19:37:41 2009 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- fix for 2.6.28

---- Files affected:
SOURCES:
   svgalib-2.6.28.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/svgalib-2.6.28.patch
diff -u /dev/null SOURCES/svgalib-2.6.28.patch:1.1
--- /dev/null	Sun Jan 25 20:37:42 2009
+++ SOURCES/svgalib-2.6.28.patch	Sun Jan 25 20:37:35 2009
@@ -0,0 +1,30 @@
+--- svgalib-1.9.25/kernel/svgalib_helper/kernel26compat.h.old	2009-01-04 21:34:26.000000000 +0100
++++ svgalib-1.9.25/kernel/svgalib_helper/kernel26compat.h	2009-01-04 21:38:29.000000000 +0100
+@@ -141,7 +141,7 @@ static inline int devfs_unregister_chrde
+                              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),              \
+@@ -152,6 +152,18 @@ static inline int devfs_unregister_chrde
+                            &sh_pci_devs[_minor]->dev->dev,              \
+                            MKDEV(SVGALIB_HELPER_MAJOR, _minor),         \
+                            "%s%d", _name, _minor);
++/* 2.6.28 went back to device_create */ 
++#else
++#  define SLH_SYSFS_ADD_CONTROL                                         \
++     device_create(svgalib_helper_class, NULL,                  \
++                           MKDEV(SVGALIB_HELPER_MAJOR, 0),              \
++                           "%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),         \
++                           "%s%d", _name, _minor);
+ #endif
+ 
+ #  define SLH_SYSFS_REMOVE_DEVICE(i)                                    \
================================================================


More information about the pld-cvs-commit mailing list