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
5 printk(KERN_INFO NAME ": tmp [0x%lx] dev->res2 [0x%lx]\n",
6 tmp, (unsigned long)dev->resource[2].start);
8 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
9 base2[numPCI] = ioremap_nocache(dev->resource[2].start &
11 + base2[numPCI] = ioremap(dev->resource[2].start &
13 PCI_BASE_ADDRESS_MEM_MASK,
14 sizeof(short)*SIZE_WD);
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
20 return single_open(file, vt_int_proc_show, PDE_DATA(inode));
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,
28 .release = single_release,
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,
39 static int vt_string_proc_show(struct seq_file *m, void *v)
42 return single_open(file, vt_string_proc_show, PDE_DATA(inode));
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,
50 .release = single_release,
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,
62 int __init vtcore_init(void)
67 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
68 static const struct file_operations vt_country_proc_fops = {
70 .open = vt_country_proc_open,
71 @@ -1089,6 +1108,15 @@
72 .release = single_release,
73 .write = vt_country_proc_write,
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,
85 // Template definitions for port ops that communicate a single integer value.
91 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
92 #define PROC_READ_PORT(attrib) \
93 PROC_READ_PORT_(attrib) \
95 @@ -1180,6 +1209,29 @@
96 .release = single_release, \
97 .write = vt_##attrib##_proc_write, \
100 +#define PROC_READ_PORT(attrib) \
101 + PROC_READ_PORT_(attrib) \
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, \
110 +#define PROC_READWRITE_PORT(attrib) \
111 + PROC_READ_PORT_(attrib) \
112 + PROC_WRITE_PORT_(attrib) \
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, \
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
131 #include <linux/cdev.h>
132 +#include <linux/proc_fs.h>
134 #include "linringbuf.h"
137 void vt_read(struct vtboard *board);
138 int vt_send_event(struct vtboard *board, char *mess, int size);
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;
144 +const struct proc_ops vt_int_proc_fops;
145 +const struct proc_ops vt_string_proc_fops;
147 void vt_create_board_proc_const_int(struct vtboard *board, const char *node, long val);
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 @@
155 //void __iomem * map = pci_iomap(dev, bar, maxbytes);
157 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
158 card->base0 = ioremap_nocache( pci_resource_start(pdev,0),
160 + card->base0 = ioremap( pci_resource_start(pdev,0),
162 pci_resource_len(pdev,0) );
163 card->base2 = ioremap( pci_resource_start(pdev,2),
164 pci_resource_len(pdev,2) );