Gentoo Archives: gentoo-commits

From: "Paul de Vrieze (pauldv)" <pauldv@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-libs/svgalib/files: svgalib-1.9.25-linux2.6.patch
Date: Tue, 28 Oct 2008 20:09:30
Message-Id: E1KuusZ-0005G1-Mi@stork.gentoo.org
1 pauldv 08/10/28 20:09:27
2
3 Modified: svgalib-1.9.25-linux2.6.patch
4 Log:
5 Fix compilation on 2.6.27
6 (Portage version: 2.2_rc12/cvs/Linux 2.6.27.1 i686)
7
8 Revision Changes Path
9 1.8 media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch?rev=1.8&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch?rev=1.8&content-type=text/plain
13 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch?r1=1.7&r2=1.8
14
15 Index: svgalib-1.9.25-linux2.6.patch
16 ===================================================================
17 RCS file: /var/cvsroot/gentoo-x86/media-libs/svgalib/files/svgalib-1.9.25-linux2.6.patch,v
18 retrieving revision 1.7
19 retrieving revision 1.8
20 diff -u -r1.7 -r1.8
21 --- svgalib-1.9.25-linux2.6.patch 1 Oct 2008 19:17:24 -0000 1.7
22 +++ svgalib-1.9.25-linux2.6.patch 28 Oct 2008 20:09:27 -0000 1.8
23 @@ -1,11 +1,11 @@
24 - - get rid of warning when linux/device.h doesnt exist
25 - - touch up the Makefile to let the ebuild handle the module details
26 - - fix support with io remap stuff in newer kernels
27 - - dont include headers that dont exist in 2.4.x kernels
28 - - use module_param() for 2.6.x and MODULE_PARM() for all others
29 - - dont declare all_devices as static since it is exported
30 - - dont include <linux/config.h> as the build system does it for us
31 - - in lrmi, map old flag names to new names for versions >= 2.6.26
32 + - get rid of warning when linux/device.h doesnt exist
33 + - touch up the Makefile to let the ebuild handle the module details
34 + - fix support with io remap stuff in newer kernels
35 + - dont include headers that dont exist in 2.4.x kernels
36 + - use module_param() for 2.6.x and MODULE_PARM() for all others
37 + - dont declare all_devices as static since it is exported
38 + - dont include <linux/config.h> as the build system does it for us
39 + - in lrmi, map old flag names to new names for versions >= 2.6.26
40
41 --- svgalib/kernel/svgalib_helper/Makefile
42 +++ svgalib/kernel/svgalib_helper/Makefile
43 @@ -83,7 +83,7 @@
44 }
45 #endif
46
47 -@@ -105,7 +109,8 @@
48 +@@ -99,7 +105,8 @@
49 class_device_create(svgalib_helper_class, \
50 MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
51 &sh_pci_devs[_minor]->dev->dev, _name);
52 @@ -93,13 +93,13 @@
53 # define SLH_SYSFS_ADD_CONTROL \
54 class_device_create(svgalib_helper_class, NULL, \
55 MKDEV(SVGALIB_HELPER_MAJOR, 0), \
56 -@@ -115,7 +120,18 @@
57 +@@ -109,7 +116,30 @@
58 class_device_create(svgalib_helper_class, NULL, \
59 MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
60 &sh_pci_devs[_minor]->dev->dev, _name);
61 -#endif /* 2.6.15 */
62 +/* 2.6.26 changed class_device_create to device_create */
63 -+#else
64 ++#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
65 +# define SLH_SYSFS_ADD_CONTROL \
66 + device_create(svgalib_helper_class, NULL, \
67 + MKDEV(SVGALIB_HELPER_MAJOR, 0), \
68 @@ -109,11 +109,23 @@
69 + device_create(svgalib_helper_class, &sh_pci_devs[_minor]->dev->dev, \
70 + MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
71 + _name);
72 ++/* 2.6.27 changed device_create to device_create_drvdata */
73 ++#else
74 ++# define SLH_SYSFS_ADD_CONTROL \
75 ++ device_create_drvdata(svgalib_helper_class, NULL, \
76 ++ MKDEV(SVGALIB_HELPER_MAJOR, 0), \
77 ++ "%s%d", "svga", 0);
78 ++
79 ++# define SLH_SYSFS_ADD_DEVICE(_name, _minor) \
80 ++ device_create_drvdata(svgalib_helper_class, \
81 ++ &sh_pci_devs[_minor]->dev->dev, \
82 ++ MKDEV(SVGALIB_HELPER_MAJOR, _minor), \
83 ++ "%s%d", _name, _minor);
84 +#endif
85
86 # define SLH_SYSFS_REMOVE_DEVICE(i) \
87 class_destroy(svgalib_helper_class);
88 -@@ -167,3 +167,7 @@
89 +@@ -161,3 +191,7 @@
90 #ifndef PCI_VENDOR_ID_RENDITION
91 #define PCI_VENDOR_ID_RENDITION 0x1163
92 #endif
93 @@ -129,7 +141,7 @@
94 #if defined (CONFIG_MODVERSIONS) && !defined (MODVERSIONS)
95 # define MODVERSIONS
96 #endif
97 -@@ -19,15 +19,22 @@
98 +@@ -17,15 +15,22 @@
99 #include <linux/ioport.h>
100 #include <linux/interrupt.h>
101 #include <linux/pci.h>
102 @@ -152,7 +164,7 @@
103
104 #define __KERNEL_SYSCALLS__
105 #include <linux/unistd.h>
106 -@@ -55,7 +55,7 @@
107 +@@ -50,7 +55,7 @@
108 #include "displaystart.h"
109
110 int debug=0;
111 @@ -161,7 +173,7 @@
112 int num_devices=0;
113
114 static char *sdev_id="svgalib_helper";
115 -@@ -103,7 +103,11 @@
116 +@@ -98,7 +103,11 @@
117 static volatile int vsync=0;
118 static wait_queue_head_t vsync_wait;
119
120 @@ -174,7 +186,7 @@
121 {
122 struct sh_pci_device *dev = (struct sh_pci_device *)dev_id;
123
124 -@@ -360,7 +364,7 @@
125 +@@ -355,7 +364,7 @@
126 vsync=1;
127 i=0;
128 while(irqs[i]!=-1)
129 @@ -183,7 +195,7 @@
130 vga_enable_vsync((void *)sdev_id);
131 wait_event_interruptible(vsync_wait, !vsync);
132 i=0;
133 -@@ -448,7 +452,7 @@
134 +@@ -443,7 +452,7 @@
135 int i=sh_pci_devs[minor]->dev->irq;
136 sh_pci_devs[minor]->opencount++;
137 if(sh_pci_devs[minor]->opencount==1 && i!=0 && i!=-1 && i!=255)
138 @@ -192,7 +204,7 @@
139 }
140
141 #ifndef KERNEL_2_6
142 -@@ -770,10 +770,15 @@
143 +@@ -763,10 +772,15 @@
144
145 }
146
147 @@ -208,11 +220,11 @@
148 +
149 +MODULE_PARM_DESC(debug, "Debug output level.");
150 MODULE_PARM_DESC(all_devices, "Give access to all PCI devices, regardless of class.");
151 -
152 +
153
154 --- svgalib/src/lrmi.6.c
155 +++ svgalib/src/lrmi.6.c
156 -@@ -169,6 +169,13 @@ LRMI_free_real(void *m)
157 +@@ -169,6 +169,13 @@
158 }
159 }
160
161 @@ -228,7 +240,7 @@
162 #define DEFAULT_STACK_SIZE 0x1000
163 --- svgalib/src/lrmi.9.c
164 +++ svgalib/src/lrmi.9.c
165 -@@ -206,6 +206,13 @@ LRMI_free_real(void *m)
166 +@@ -206,6 +206,13 @@
167
168
169 #if defined(__linux__)
170 @@ -244,7 +256,7 @@
171 #define DEFAULT_VM86_FLAGS (PSL_I | PSL_IOPL)
172 --- svgalib/lrmi-0.6m/lrmi.c
173 +++ svgalib/lrmi-0.6m/lrmi.c
174 -@@ -170,6 +170,14 @@ LRMI_free_real(void *m)
175 +@@ -170,6 +170,14 @@
176 }
177
178
179 @@ -261,7 +273,7 @@
180 #define RETURN_TO_32_INT 255
181 --- svgalib/lrmi-0.9/lrmi.c
182 +++ svgalib/lrmi-0.9/lrmi.c
183 -@@ -203,6 +203,13 @@ LRMI_free_real(void *m)
184 +@@ -203,6 +203,13 @@
185
186
187 #if defined(__linux__)