diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-11 20:09:22 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 16:15:13 -0400 |
commit | 81c524f76a353a19097e004ec05e4d62fd0bd57e (patch) | |
tree | b2a991de2d93c21694e78d9e6b1b0b5e4daf2c03 /net/batman-adv | |
parent | 41063e9dd11956f2d285e12e4342e1d232ba0ea2 (diff) |
batman-adv: Prefix bat_algo non-static functions with batadv_
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.
Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv')
-rw-r--r-- | net/batman-adv/bat_algo.h | 2 | ||||
-rw-r--r-- | net/batman-adv/bat_iv_ogm.c | 2 | ||||
-rw-r--r-- | net/batman-adv/main.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/net/batman-adv/bat_algo.h b/net/batman-adv/bat_algo.h index 9852a688ba43..a14336a08fac 100644 --- a/net/batman-adv/bat_algo.h +++ b/net/batman-adv/bat_algo.h | |||
@@ -22,6 +22,6 @@ | |||
22 | #ifndef _NET_BATMAN_ADV_BAT_ALGO_H_ | 22 | #ifndef _NET_BATMAN_ADV_BAT_ALGO_H_ |
23 | #define _NET_BATMAN_ADV_BAT_ALGO_H_ | 23 | #define _NET_BATMAN_ADV_BAT_ALGO_H_ |
24 | 24 | ||
25 | int bat_iv_init(void); | 25 | int batadv_iv_init(void); |
26 | 26 | ||
27 | #endif /* _NET_BATMAN_ADV_BAT_ALGO_H_ */ | 27 | #endif /* _NET_BATMAN_ADV_BAT_ALGO_H_ */ |
diff --git a/net/batman-adv/bat_iv_ogm.c b/net/batman-adv/bat_iv_ogm.c index 6e0859f4a6a9..b44573903264 100644 --- a/net/batman-adv/bat_iv_ogm.c +++ b/net/batman-adv/bat_iv_ogm.c | |||
@@ -1248,7 +1248,7 @@ static struct bat_algo_ops batman_iv __read_mostly = { | |||
1248 | .bat_ogm_emit = bat_iv_ogm_emit, | 1248 | .bat_ogm_emit = bat_iv_ogm_emit, |
1249 | }; | 1249 | }; |
1250 | 1250 | ||
1251 | int __init bat_iv_init(void) | 1251 | int __init batadv_iv_init(void) |
1252 | { | 1252 | { |
1253 | int ret; | 1253 | int ret; |
1254 | 1254 | ||
diff --git a/net/batman-adv/main.c b/net/batman-adv/main.c index 46ba302d2d01..1f064d430a29 100644 --- a/net/batman-adv/main.c +++ b/net/batman-adv/main.c | |||
@@ -56,7 +56,7 @@ static int __init batman_init(void) | |||
56 | 56 | ||
57 | recv_handler_init(); | 57 | recv_handler_init(); |
58 | 58 | ||
59 | bat_iv_init(); | 59 | batadv_iv_init(); |
60 | 60 | ||
61 | /* the name should not be longer than 10 chars - see | 61 | /* the name should not be longer than 10 chars - see |
62 | * http://lwn.net/Articles/23634/ */ | 62 | * http://lwn.net/Articles/23634/ */ |