From a231817c01bda4020632d5c62429e1bdf93f73e5 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 2 Aug 2019 21:25:19 +0200 Subject: header: Add BITS_PER_TYPE() BITS_PER_TYPE was moved in the upstream kernel in commit 9144d75e22ca ("include/linux/bitops.h: introduce BITS_PER_TYPE") in kernel 4.19 and is now used by the ath10k driver. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/bitops.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backport/backport-include/linux/bitops.h b/backport/backport-include/linux/bitops.h index 86360d04..17bd8138 100644 --- a/backport/backport-include/linux/bitops.h +++ b/backport/backport-include/linux/bitops.h @@ -20,4 +20,8 @@ #define BIT_ULL(nr) (1ULL << (nr)) #endif +#ifndef BITS_PER_TYPE +#define BITS_PER_TYPE(type) (sizeof(type) * BITS_PER_BYTE) +#endif + #endif /* __BACKPORT_BITOPS_H */ -- cgit v1.2.3