diff options
Diffstat (limited to 'media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch')
-rw-r--r-- | media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch | 58 |
1 files changed, 35 insertions, 23 deletions
diff --git a/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch index f3b61e1e8e1d..20ab1fe1ed16 100644 --- a/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch +++ b/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch @@ -1,11 +1,11 @@ - - get rid of warning when linux/device.h doesnt exist - - touch up the Makefile to let the ebuild handle the module details - - fix support with io remap stuff in newer kernels - - dont include headers that dont exist in 2.4.x kernels - - use module_param() for 2.6.x and MODULE_PARM() for all others - - dont declare all_devices as static since it is exported - - dont include <linux/config.h> as the build system does it for us - - in lrmi, map old flag names to new names for versions >= 2.6.26 + - get rid of warning when linux/device.h doesnt exist + - touch up the Makefile to let the ebuild handle the module details + - fix support with io remap stuff in newer kernels + - dont include headers that dont exist in 2.4.x kernels + - use module_param() for 2.6.x and MODULE_PARM() for all others + - dont declare all_devices as static since it is exported + - dont include <linux/config.h> as the build system does it for us + - in lrmi, map old flag names to new names for versions >= 2.6.26 --- svgalib/kernel/svgalib_helper/Makefile +++ svgalib/kernel/svgalib_helper/Makefile @@ -83,7 +83,7 @@ } #endif -@@ -105,7 +109,8 @@ +@@ -99,7 +105,8 @@ class_device_create(svgalib_helper_class, \ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \ &sh_pci_devs[_minor]->dev->dev, _name); @@ -93,13 +93,13 @@ # define SLH_SYSFS_ADD_CONTROL \ class_device_create(svgalib_helper_class, NULL, \ MKDEV(SVGALIB_HELPER_MAJOR, 0), \ -@@ -115,7 +120,18 @@ +@@ -109,7 +116,30 @@ class_device_create(svgalib_helper_class, NULL, \ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \ &sh_pci_devs[_minor]->dev->dev, _name); -#endif /* 2.6.15 */ +/* 2.6.26 changed class_device_create to device_create */ -+#else ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27) +# define SLH_SYSFS_ADD_CONTROL \ + device_create(svgalib_helper_class, NULL, \ + MKDEV(SVGALIB_HELPER_MAJOR, 0), \ @@ -109,11 +109,23 @@ + device_create(svgalib_helper_class, &sh_pci_devs[_minor]->dev->dev, \ + MKDEV(SVGALIB_HELPER_MAJOR, _minor), \ + _name); ++/* 2.6.27 changed device_create to device_create_drvdata */ ++#else ++# define SLH_SYSFS_ADD_CONTROL \ ++ device_create_drvdata(svgalib_helper_class, NULL, \ ++ MKDEV(SVGALIB_HELPER_MAJOR, 0), \ ++ "%s%d", "svga", 0); ++ ++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \ ++ device_create_drvdata(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) \ class_destroy(svgalib_helper_class); -@@ -167,3 +167,7 @@ +@@ -161,3 +191,7 @@ #ifndef PCI_VENDOR_ID_RENDITION #define PCI_VENDOR_ID_RENDITION 0x1163 #endif @@ -129,7 +141,7 @@ #if defined (CONFIG_MODVERSIONS) && !defined (MODVERSIONS) # define MODVERSIONS #endif -@@ -19,15 +19,22 @@ +@@ -17,15 +15,22 @@ #include <linux/ioport.h> #include <linux/interrupt.h> #include <linux/pci.h> @@ -152,7 +164,7 @@ #define __KERNEL_SYSCALLS__ #include <linux/unistd.h> -@@ -55,7 +55,7 @@ +@@ -50,7 +55,7 @@ #include "displaystart.h" int debug=0; @@ -161,7 +173,7 @@ int num_devices=0; static char *sdev_id="svgalib_helper"; -@@ -103,7 +103,11 @@ +@@ -98,7 +103,11 @@ static volatile int vsync=0; static wait_queue_head_t vsync_wait; @@ -174,7 +186,7 @@ { struct sh_pci_device *dev = (struct sh_pci_device *)dev_id; -@@ -360,7 +364,7 @@ +@@ -355,7 +364,7 @@ vsync=1; i=0; while(irqs[i]!=-1) @@ -183,7 +195,7 @@ vga_enable_vsync((void *)sdev_id); wait_event_interruptible(vsync_wait, !vsync); i=0; -@@ -448,7 +452,7 @@ +@@ -443,7 +452,7 @@ int i=sh_pci_devs[minor]->dev->irq; sh_pci_devs[minor]->opencount++; if(sh_pci_devs[minor]->opencount==1 && i!=0 && i!=-1 && i!=255) @@ -192,7 +204,7 @@ } #ifndef KERNEL_2_6 -@@ -770,10 +770,15 @@ +@@ -763,10 +772,15 @@ } @@ -208,11 +220,11 @@ + +MODULE_PARM_DESC(debug, "Debug output level."); MODULE_PARM_DESC(all_devices, "Give access to all PCI devices, regardless of class."); - + --- svgalib/src/lrmi.6.c +++ svgalib/src/lrmi.6.c -@@ -169,6 +169,13 @@ LRMI_free_real(void *m) +@@ -169,6 +169,13 @@ } } @@ -228,7 +240,7 @@ #define DEFAULT_STACK_SIZE 0x1000 --- svgalib/src/lrmi.9.c +++ svgalib/src/lrmi.9.c -@@ -206,6 +206,13 @@ LRMI_free_real(void *m) +@@ -206,6 +206,13 @@ #if defined(__linux__) @@ -244,7 +256,7 @@ #define DEFAULT_VM86_FLAGS (PSL_I | PSL_IOPL) --- svgalib/lrmi-0.6m/lrmi.c +++ svgalib/lrmi-0.6m/lrmi.c -@@ -170,6 +170,14 @@ LRMI_free_real(void *m) +@@ -170,6 +170,14 @@ } @@ -261,7 +273,7 @@ #define RETURN_TO_32_INT 255 --- svgalib/lrmi-0.9/lrmi.c +++ svgalib/lrmi-0.9/lrmi.c -@@ -203,6 +203,13 @@ LRMI_free_real(void *m) +@@ -203,6 +203,13 @@ #if defined(__linux__) |