From 198e79f0e8f0b24c1e36ab6032d348f40de20262 Mon Sep 17 00:00:00 2001 From: Dominik Sliwa Date: Fri, 22 Dec 2017 12:07:34 +0000 Subject: backports: bluetooth: Support 4.9 kernels Signed-off-by: Dominik Sliwa --- backport-include/linux/kref.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 backport-include/linux/kref.h (limited to 'backport-include/linux/kref.h') diff --git a/backport-include/linux/kref.h b/backport-include/linux/kref.h new file mode 100644 index 0000000..631488f --- /dev/null +++ b/backport-include/linux/kref.h @@ -0,0 +1,13 @@ +#ifndef __BACKPORT_LINUX_KREF_H +#define __BACKPORT_LINUX_KREF_H +#include_next + +#if LINUX_VERSION_IS_LESS(4,11,0) +#include +static inline unsigned int kref_read(const struct kref *kref) +{ + return refcount_read((const refcount_t *)&kref->refcount); +} +#endif /* < 4.11 */ + +#endif /* __BACKPORT_LINUX_KREF_H */ -- cgit v1.2.3