summaryrefslogtreecommitdiff
path: root/include/linux/scmi_protocol.h
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2020-04-03 18:10:17 +0100
committerSudeep Holla <sudeep.holla@arm.com>2020-04-14 09:31:49 +0100
commit70771c69ab9be6e37618b1ec6c105f370e510f94 (patch)
tree18820e5fec3ab4604be68bf878e13ba2741cbcdc /include/linux/scmi_protocol.h
parent4e44590ee4a917df5ce557df4ad831ec5e82b4a6 (diff)
firmware: arm_scmi: Add include guard to linux/scmi_protocol.h
If this header is include twice, it will generate loads of compile time error with the following below error pattern. It was reported by 0day kbuild robot on a branch pushed with double inclusion by accident. error: conflicting types for ‘...’ note: previous declaration of ‘...’ was here error: redefinition of ‘...’ Add a header include guard just in case. Link: https://lore.kernel.org/r/20200403171018.1230-1-sudeep.holla@arm.com Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'include/linux/scmi_protocol.h')
-rw-r--r--include/linux/scmi_protocol.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
index 5c873a59b387..ce2f5c28b2df 100644
--- a/include/linux/scmi_protocol.h
+++ b/include/linux/scmi_protocol.h
@@ -4,6 +4,10 @@
*
* Copyright (C) 2018 ARM Ltd.
*/
+
+#ifndef _LINUX_SCMI_PROTOCOL_H
+#define _LINUX_SCMI_PROTOCOL_H
+
#include <linux/device.h>
#include <linux/types.h>
@@ -319,3 +323,5 @@ static inline void scmi_driver_unregister(struct scmi_driver *driver) {}
typedef int (*scmi_prot_init_fn_t)(struct scmi_handle *);
int scmi_protocol_register(int protocol_id, scmi_prot_init_fn_t fn);
void scmi_protocol_unregister(int protocol_id);
+
+#endif /* _LINUX_SCMI_PROTOCOL_H */