lkml.org 
[lkml]   [2014]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 02/13] AT91: generic.h: Add include safe guards
Date
The generic.h header file doesn't have any safe guards against multiple
inclusion. It only worked so far because all the symbols defined in it were
extern, but this is a rather fragile assumption.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
arch/arm/mach-at91/generic.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h
index 631fa3b8c16d..77d4daeee66a 100644
--- a/arch/arm/mach-at91/generic.h
+++ b/arch/arm/mach-at91/generic.h
@@ -8,6 +8,9 @@
* published by the Free Software Foundation.
*/

+#ifndef _AT91_GENERIC_H
+#define _AT91_GENERIC_H
+
#include <linux/clkdev.h>
#include <linux/of.h>
#include <linux/reboot.h>
@@ -90,3 +93,5 @@ extern int __init at91_gpio_of_irq_setup(struct device_node *node,
struct device_node *parent);

extern u32 at91_get_extern_irq(void);
+
+#endif /* _AT91_GENERIC_H */
--
2.0.0


\
 
 \ /
  Last update: 2014-06-25 17:21    [W:0.449 / U:0.284 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site