refcount: trim headers
Subsystems (3)
PATCH v2 1/1 refcount: trim headers
kernel.h is not needed, but compiler.h is.
mutex.h is not needed only a forward declaration of "struct mutex".
spinlock.h is not needed, spinlock_types.h is enough.
Signed-off-by Alexey Dobriyan <[email protected]>
---
arch/x86/include/asm/refcount.h | 1 + include/linux/refcount.h | 7 ++++--- lib/refcount.c | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-)
arch/x86/include/asm/refcount.h +1 -0
@@ -5,6 +5,7 @@* PaX/grsecurity. */ #include <linux/refcount.h> +#include <asm/bug.h> /* * This is the first portion of the refcount error handling, which lives in
include/linux/refcount.h +4 -3
@@ -3,9 +3,10 @@#define _LINUX_REFCOUNT_H#include <linux/atomic.h> -#include <linux/mutex.h> -#include <linux/spinlock.h> -#include <linux/kernel.h> +#include <linux/compiler.h> +#include <linux/spinlock_types.h> + +struct mutex ;/** * struct refcount_t - variant of atomic_t specialized for reference counts
lib/refcount.c +2 -0
@@ -35,7 +35,9 @@* */ +#include <linux/mutex.h> #include <linux/refcount.h> +#include <linux/spinlock.h> #include <linux/bug.h> #ifdef CONFIG_REFCOUNT_FULL