]>
Commit | Line | Data |
---|---|---|
6a1e6d9f JR |
1 | diff -ur dahdi-linux-2.11.1/drivers/dahdi/dahdi-base.c dahdi-linux-2.11.1-4.11/drivers/dahdi/dahdi-base.c |
2 | --- dahdi-linux-2.11.1/drivers/dahdi/dahdi-base.c 2016-03-01 23:03:59.000000000 +0100 | |
3 | +++ dahdi-linux-2.11.1-4.11/drivers/dahdi/dahdi-base.c 2017-05-09 20:34:45.170079849 +0200 | |
4 | @@ -47,6 +47,9 @@ | |
5 | #include <linux/kmod.h> | |
6 | #include <linux/moduleparam.h> | |
7 | #include <linux/sched.h> | |
8 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0) | |
9 | +#include <linux/sched/signal.h> | |
10 | +#endif | |
11 | #include <linux/list.h> | |
12 | #include <linux/delay.h> | |
13 | #include <linux/mutex.h> | |
14 | diff -ur dahdi-linux-2.11.1/drivers/dahdi/dahdi_dynamic.c dahdi-linux-2.11.1-4.11/drivers/dahdi/dahdi_dynamic.c | |
15 | --- dahdi-linux-2.11.1/drivers/dahdi/dahdi_dynamic.c 2016-03-01 23:03:59.000000000 +0100 | |
16 | +++ dahdi-linux-2.11.1-4.11/drivers/dahdi/dahdi_dynamic.c 2017-05-09 20:38:03.809649973 +0200 | |
17 | @@ -467,7 +467,11 @@ | |
18 | ||
19 | /* We shouldn't have more than the two references at this point. If | |
20 | * we do, there are probably channels that are still opened. */ | |
21 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0) | |
22 | if (atomic_read(&d->kref.refcount) > 2) { | |
23 | +#else | |
24 | + if (kref_read(&d->kref) > 2) { | |
25 | +#endif | |
26 | dynamic_put(d); | |
27 | return -EBUSY; | |
28 | } | |
29 | diff -ur dahdi-linux-2.11.1/drivers/dahdi/wcaxx-base.c dahdi-linux-2.11.1-4.11/drivers/dahdi/wcaxx-base.c | |
30 | --- dahdi-linux-2.11.1/drivers/dahdi/wcaxx-base.c 2016-03-01 23:03:59.000000000 +0100 | |
31 | +++ dahdi-linux-2.11.1-4.11/drivers/dahdi/wcaxx-base.c 2017-05-09 20:39:05.690553708 +0200 | |
32 | @@ -28,6 +28,9 @@ | |
33 | #include <linux/init.h> | |
34 | #include <linux/pci.h> | |
35 | #include <linux/sched.h> | |
36 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0) | |
37 | +#include <linux/sched/signal.h> | |
38 | +#endif | |
39 | #include <linux/workqueue.h> | |
40 | #include <linux/delay.h> | |
41 | #include <linux/moduleparam.h> | |
42 | diff -ur dahdi-linux-2.11.1/drivers/dahdi/wctc4xxp/base.c dahdi-linux-2.11.1-4.11/drivers/dahdi/wctc4xxp/base.c | |
43 | --- dahdi-linux-2.11.1/drivers/dahdi/wctc4xxp/base.c 2016-03-01 23:03:59.000000000 +0100 | |
44 | +++ dahdi-linux-2.11.1-4.11/drivers/dahdi/wctc4xxp/base.c 2017-05-09 20:40:14.041864392 +0200 | |
45 | @@ -26,6 +26,10 @@ | |
46 | #include <linux/slab.h> | |
47 | #include <linux/kmod.h> | |
48 | #include <linux/sched.h> | |
49 | +#include <linux/version.h> | |
50 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0) | |
51 | +#include <linux/sched/signal.h> | |
52 | +#endif | |
53 | #include <linux/pci.h> | |
54 | #include <linux/interrupt.h> | |
55 | #include <linux/delay.h> | |
56 | diff -ur dahdi-linux-2.11.1/drivers/dahdi/wctdm24xxp/base.c dahdi-linux-2.11.1-4.11/drivers/dahdi/wctdm24xxp/base.c | |
57 | --- dahdi-linux-2.11.1/drivers/dahdi/wctdm24xxp/base.c 2016-03-01 23:03:59.000000000 +0100 | |
58 | +++ dahdi-linux-2.11.1-4.11/drivers/dahdi/wctdm24xxp/base.c 2017-05-09 20:39:47.343067209 +0200 | |
59 | @@ -44,6 +44,9 @@ | |
60 | #include <linux/init.h> | |
61 | #include <linux/pci.h> | |
62 | #include <linux/sched.h> | |
63 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0) | |
64 | +#include <linux/sched/signal.h> | |
65 | +#endif | |
66 | #include <linux/interrupt.h> | |
67 | #include <linux/workqueue.h> | |
68 | #include <linux/delay.h> | |
69 | diff -ur dahdi-linux-2.11.1/drivers/dahdi/wcte12xp/base.c dahdi-linux-2.11.1-4.11/drivers/dahdi/wcte12xp/base.c | |
70 | --- dahdi-linux-2.11.1/drivers/dahdi/wcte12xp/base.c 2016-03-01 23:03:59.000000000 +0100 | |
71 | +++ dahdi-linux-2.11.1-4.11/drivers/dahdi/wcte12xp/base.c 2017-05-09 20:40:31.216160114 +0200 | |
72 | @@ -40,6 +40,10 @@ | |
73 | #include <linux/workqueue.h> | |
74 | #include <linux/delay.h> | |
75 | #include <linux/sched.h> | |
76 | +#include <linux/version.h> | |
77 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0) | |
78 | +#include <linux/sched/signal.h> | |
79 | +#endif | |
80 | #include <linux/slab.h> | |
81 | ||
82 | #include <stdbool.h> | |
83 | diff -ur dahdi-linux-2.11.1/drivers/dahdi/wcte43x-base.c dahdi-linux-2.11.1-4.11/drivers/dahdi/wcte43x-base.c | |
84 | --- dahdi-linux-2.11.1/drivers/dahdi/wcte43x-base.c 2016-03-01 23:03:59.000000000 +0100 | |
85 | +++ dahdi-linux-2.11.1-4.11/drivers/dahdi/wcte43x-base.c 2017-05-09 20:38:38.996830549 +0200 | |
86 | @@ -33,6 +33,10 @@ | |
87 | #include <linux/workqueue.h> | |
88 | #include <linux/delay.h> | |
89 | #include <linux/sched.h> | |
90 | +#include <linux/version.h> | |
91 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,11,0) | |
92 | +#include <linux/sched/signal.h> | |
93 | +#endif | |
94 | #include <linux/crc32.h> | |
95 | #include <linux/slab.h> | |
96 | ||
97 | diff -ur dahdi-linux-2.11.1/drivers/dahdi/xpp/xbus-core.c dahdi-linux-2.11.1-4.11/drivers/dahdi/xpp/xbus-core.c | |
98 | --- dahdi-linux-2.11.1/drivers/dahdi/xpp/xbus-core.c 2016-03-01 23:03:59.000000000 +0100 | |
99 | +++ dahdi-linux-2.11.1-4.11/drivers/dahdi/xpp/xbus-core.c 2017-05-09 20:41:27.973007253 +0200 | |
100 | @@ -244,7 +244,11 @@ | |
101 | { | |
102 | struct kref *kref = &xbus->kref; | |
103 | ||
104 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0) | |
105 | return atomic_read(&kref->refcount); | |
106 | +#else | |
107 | + return kref_read(kref); | |
108 | +#endif | |
109 | } | |
110 | ||
111 | /*------------------------- Frame Handling ------------------------*/ | |
112 | diff -ur dahdi-linux-2.11.1/drivers/dahdi/xpp/xbus-sysfs.c dahdi-linux-2.11.1-4.11/drivers/dahdi/xpp/xbus-sysfs.c | |
113 | --- dahdi-linux-2.11.1/drivers/dahdi/xpp/xbus-sysfs.c 2016-03-01 23:03:59.000000000 +0100 | |
114 | +++ dahdi-linux-2.11.1-4.11/drivers/dahdi/xpp/xbus-sysfs.c 2017-05-09 20:42:09.972886067 +0200 | |
115 | @@ -974,7 +974,11 @@ | |
116 | return; | |
117 | } | |
118 | XBUS_DBG(DEVICES, xbus, "going to unregister: refcount=%d\n", | |
119 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0) | |
120 | atomic_read(&astribank->kobj.kref.refcount)); | |
121 | +#else | |
122 | + kref_read(&astribank->kobj.kref)); | |
123 | +#endif | |
124 | BUG_ON(dev_get_drvdata(astribank) != xbus); | |
125 | device_unregister(astribank); | |
126 | dev_set_drvdata(astribank, NULL); | |
127 | diff -ur dahdi-linux-2.11.1/drivers/dahdi/xpp/xpp_dahdi.c dahdi-linux-2.11.1-4.11/drivers/dahdi/xpp/xpp_dahdi.c | |
128 | --- dahdi-linux-2.11.1/drivers/dahdi/xpp/xpp_dahdi.c 2016-03-01 23:03:59.000000000 +0100 | |
129 | +++ dahdi-linux-2.11.1-4.11/drivers/dahdi/xpp/xpp_dahdi.c 2017-05-09 20:42:55.336485638 +0200 | |
130 | @@ -124,7 +124,11 @@ | |
131 | { | |
132 | struct kref *kref = &xpd->kref; | |
133 | ||
134 | +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,11,0) | |
135 | return atomic_read(&kref->refcount); | |
136 | +#else | |
137 | + return kref_read(kref); | |
138 | +#endif | |
139 | } | |
140 | ||
141 | xpd_t *get_xpd(const char *msg, xpd_t *xpd) |