From 73ba5e11f7582967f5151f5a3cb27932b47f44fa Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 13 Nov 2017 22:18:00 +0100 Subject: lantiq: fix lantiq applications kernel 4.14 compatiblity This is fixing multiple compile problems with kernel 4.14 and updates the code to take care of changes introduced between kernel 4.9 and 4.14. Signed-off-by: Hauke Mehrtens Signed-off-by: Mathias Kresin --- package/kernel/lantiq/ltq-atm/src/ltq_atm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'package/kernel/lantiq/ltq-atm/src/ltq_atm.c') diff --git a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c index 0b9d7a05ab..a8f787fdca 100644 --- a/package/kernel/lantiq/ltq-atm/src/ltq_atm.c +++ b/package/kernel/lantiq/ltq-atm/src/ltq_atm.c @@ -812,7 +812,11 @@ struct sk_buff* atm_alloc_tx(struct atm_vcc *vcc, unsigned int size) return NULL; } +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,13,0)) + refcount_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); +#else atomic_add(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); +#endif return skb; } -- cgit v1.2.3