]> git.pld-linux.org Git - packages/vpb-driver.git/blob - kernel-5.6.patch
- rel 10
[packages/vpb-driver.git] / kernel-5.6.patch
1 diff -ur vpb-driver-4.2.58/src/vpb/vpb.c vpb-driver-4.2.58-kernel-5.6/src/vpb/vpb.c
2 --- vpb-driver-4.2.58/src/vpb/vpb.c     2020-04-07 23:21:44.462483689 +0200
3 +++ vpb-driver-4.2.58-kernel-5.6/src/vpb/vpb.c  2020-04-07 23:21:12.351359828 +0200
4 @@ -284,7 +284,11 @@
5                         printk(KERN_INFO NAME ": tmp [0x%lx] dev->res2 [0x%lx]\n",
6                                                tmp, (unsigned long)dev->resource[2].start);
7  
8 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
9                          base2[numPCI] = ioremap_nocache(dev->resource[2].start &
10 +#else
11 +                        base2[numPCI] = ioremap(dev->resource[2].start &
12 +#endif
13                                                  PCI_BASE_ADDRESS_MEM_MASK,
14                                                  sizeof(short)*SIZE_WD);
15  
16 diff -ur vpb-driver-4.2.58/src/vtcore/vtcore_main.c vpb-driver-4.2.58-kernel-5.6/src/vtcore/vtcore_main.c
17 --- vpb-driver-4.2.58/src/vtcore/vtcore_main.c  2014-09-28 20:02:28.000000000 +0200
18 +++ vpb-driver-4.2.58-kernel-5.6/src/vtcore/vtcore_main.c       2020-04-07 23:13:43.483613391 +0200
19 @@ -225,12 +225,21 @@
20         return single_open(file, vt_int_proc_show, PDE_DATA(inode));
21  }
22  
23 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
24  const struct file_operations vt_int_proc_fops = {
25         .open           = vt_int_proc_open,
26         .read           = seq_read,
27         .llseek         = seq_lseek,
28         .release        = single_release,
29  }; //}}}
30 +#else
31 +const struct proc_ops vt_int_proc_fops = {
32 +       .proc_open              = vt_int_proc_open,
33 +       .proc_read              = seq_read,
34 +       .proc_lseek             = seq_lseek,
35 +       .proc_release   = single_release,
36 +}; //}}}
37 +#endif
38  
39  static int vt_string_proc_show(struct seq_file *m, void *v)
40  { //{{{
41 @@ -243,12 +252,21 @@
42         return single_open(file, vt_string_proc_show, PDE_DATA(inode));
43  }
44  
45 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
46  const struct file_operations vt_string_proc_fops = {
47         .open           = vt_string_proc_open,
48         .read           = seq_read,
49         .llseek         = seq_lseek,
50         .release        = single_release,
51  }; //}}}
52 +#else
53 +const struct proc_ops vt_string_proc_fops = {
54 +       .proc_open              = vt_string_proc_open,
55 +       .proc_read              = seq_read,
56 +       .proc_lseek             = seq_lseek,
57 +       .proc_release   = single_release,
58 +}; //}}}
59 +#endif
60  
61  
62  int __init vtcore_init(void)
63 @@ -1081,6 +1099,7 @@
64         return ret;
65  }
66  
67 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
68  static const struct file_operations vt_country_proc_fops = {
69         .owner          = THIS_MODULE,
70         .open           = vt_country_proc_open,
71 @@ -1089,6 +1108,15 @@
72         .release        = single_release,
73         .write          = vt_country_proc_write,
74  }; //}}}
75 +#else
76 +static const struct proc_ops vt_country_proc_fops = {
77 +       .proc_open              = vt_country_proc_open,
78 +       .proc_read              = seq_read,
79 +       .proc_lseek             = seq_lseek,
80 +       .proc_release   = single_release,
81 +       .proc_write             = vt_country_proc_write,
82 +}; //}}}
83 +#endif
84  
85  // Template definitions for port ops that communicate a single integer value.
86  // {{{
87 @@ -1158,6 +1186,7 @@
88         return ret;                                                             \
89  }
90  
91 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
92  #define PROC_READ_PORT(attrib)                                                 \
93         PROC_READ_PORT_(attrib)                                                 \
94                                                                                 \
95 @@ -1180,6 +1209,29 @@
96         .release        = single_release,                                       \
97         .write          = vt_##attrib##_proc_write,                             \
98  };
99 +#else
100 +#define PROC_READ_PORT(attrib)                                                 \
101 +       PROC_READ_PORT_(attrib)                                                 \
102 +                                                                               \
103 +static const struct proc_ops vt_##attrib##_proc_fops = {                       \
104 +       .proc_open      = vt_##attrib##_proc_open,                              \
105 +       .proc_read      = seq_read,                                             \
106 +       .proc_lseek     = seq_lseek,                                            \
107 +       .proc_release   = single_release,                                       \
108 +};
109 +
110 +#define PROC_READWRITE_PORT(attrib)                                            \
111 +       PROC_READ_PORT_(attrib)                                                 \
112 +       PROC_WRITE_PORT_(attrib)                                                \
113 +                                                                               \
114 +static const struct proc_ops vt_##attrib##_proc_fops = {                       \
115 +       .proc_open      = vt_##attrib##_proc_open,                              \
116 +       .proc_read      = seq_read,                                             \
117 +       .proc_lseek     = seq_lseek,                                            \
118 +       .proc_release   = single_release,                                       \
119 +       .proc_write     = vt_##attrib##_proc_write,                             \
120 +};
121 +#endif
122  //}}}
123  
124  PROC_READWRITE_PORT(playgain)
125 diff -ur vpb-driver-4.2.58/src/vtcore/vtmodule.h vpb-driver-4.2.58-kernel-5.6/src/vtcore/vtmodule.h
126 --- vpb-driver-4.2.58/src/vtcore/vtmodule.h     2014-09-28 20:02:28.000000000 +0200
127 +++ vpb-driver-4.2.58-kernel-5.6/src/vtcore/vtmodule.h  2020-04-07 23:20:06.772506361 +0200
128 @@ -9,6 +9,7 @@
129  #define __VTMODULE__
130  
131  #include <linux/cdev.h>
132 +#include <linux/proc_fs.h>
133  
134  #include "linringbuf.h"
135  
136 @@ -159,8 +160,13 @@
137  void vt_read(struct vtboard *board);
138  int vt_send_event(struct vtboard *board, char *mess, int size);
139  
140 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
141  const struct file_operations vt_int_proc_fops;
142  const struct file_operations vt_string_proc_fops;
143 +#else
144 +const struct proc_ops vt_int_proc_fops;
145 +const struct proc_ops vt_string_proc_fops;
146 +#endif
147  void vt_create_board_proc_const_int(struct vtboard *board, const char *node, long val);
148  
149  #endif
150 diff -ur vpb-driver-4.2.58/src/vtcore/vtopenswitch.c vpb-driver-4.2.58-kernel-5.6/src/vtcore/vtopenswitch.c
151 --- vpb-driver-4.2.58/src/vtcore/vtopenswitch.c 2014-09-28 20:02:28.000000000 +0200
152 +++ vpb-driver-4.2.58-kernel-5.6/src/vtcore/vtopenswitch.c      2020-04-07 23:09:27.362701175 +0200
153 @@ -1642,7 +1642,11 @@
154         //XXX The new way.
155         //void __iomem * map = pci_iomap(dev, bar, maxbytes);
156  
157 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
158         card->base0 = ioremap_nocache( pci_resource_start(pdev,0),
159 +#else
160 +       card->base0 = ioremap( pci_resource_start(pdev,0),
161 +#endif
162                                        pci_resource_len(pdev,0) );
163         card->base2 = ioremap( pci_resource_start(pdev,2),
164                                pci_resource_len(pdev,2) );
This page took 0.088258 seconds and 3 git commands to generate.