summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2019-08-02 21:25:19 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2019-08-14 20:15:48 +0200
commita231817c01bda4020632d5c62429e1bdf93f73e5 (patch)
tree750dd63c6d08647ff66988ff54b9ce2d9719bb86
parent0cf087bebf8d49663e018ef0048eb1a7d6607594 (diff)
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 <hauke@hauke-m.de>
-rw-r--r--backport/backport-include/linux/bitops.h4
1 files changed, 4 insertions, 0 deletions
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 */