2014-01-10 06:41:28

by Shawn Guo

[permalink] [raw]
Subject: [PATCH] genalloc: spinlock_t needs spinlock_types.h

Compiling a C file which includes genalloc.h but without
spinlock_types.h being included before, we will see the compile error
below.

include/linux/genalloc.h:54:2: error: unknown type name ‘spinlock_t’

Include spinlock_types.h from genalloc.h to fix the problem.

Signed-off-by: Shawn Guo <[email protected]>
---
include/linux/genalloc.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/include/linux/genalloc.h b/include/linux/genalloc.h
index 1eda33d..1c2fdaa 100644
--- a/include/linux/genalloc.h
+++ b/include/linux/genalloc.h
@@ -30,6 +30,8 @@
#ifndef __GENALLOC_H__
#define __GENALLOC_H__

+#include <linux/spinlock_types.h>
+
struct device;
struct device_node;

--
1.7.9.5