summarylogtreecommitdiffstats
path: root/svgalib-1.9.25-linux2.6.36.patch
blob: e19d378b67cec3c22d8ed989145966e672546ac1 (plain)
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
31
32
--- src/svgalib-1.9.25/kernel/svgalib_helper/main.c
+++ src/svgalib-1.9.25/kernel/svgalib_helper/main.c
@@ -162,10 +162,16 @@ static void task_startad(void *data) {
 	get_user(pciv.address, &user_pciv->address); \
 	get_user(pciv.val, &user_pciv->val); 
 #define PUT_PCIV \
-	put_user(pciv.val, &user_pciv->val); 
+	put_user(pciv.val, &user_pciv->val);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36) 
 static int svgalib_helper_ioctl( struct inode *inode, struct file *filp, 
                           unsigned int cmd, unsigned long arg) {
+#else
+static int svgalib_helper_ioctl(struct file *filp, 
+                          unsigned int cmd, unsigned long arg) {
+#endif
 
+    struct inode *inode=filp->f_dentry->d_inode;
     io_t iov, *user_iov=(io_t *)arg;
     pcic_t pciv, *user_pciv=(pcic_t *)arg;
     int minor = my_minor(inode->i_rdev);
@@ -595,7 +601,11 @@ struct file_operations svgalib_helper_fo
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,0)
    .owner	= THIS_MODULE,
 #endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)
    .ioctl	= svgalib_helper_ioctl,
+#else
+   .unlocked_ioctl	= svgalib_helper_ioctl,
+#endif
    .mmap	= svgalib_helper_mmap,
    .open	= svgalib_helper_open,
    .release	= svgalib_helper_release,