diff options
author | Sven Eckelmann <sven@narfation.org> | 2011-06-04 13:26:00 +0400 |
---|---|---|
committer | Sven Eckelmann <sven@narfation.org> | 2011-06-09 22:40:38 +0400 |
commit | e8958dbf0da377e11f385a9888da3f72e827ab26 (patch) | |
tree | bf2c84c423ebdfba4b88afad1fcb7d9a96070902 /net/batman-adv/hard-interface.h | |
parent | 3d222bbaa7329e8ef45129e1bd6801000d7e05e4 (diff) | |
download | linux-e8958dbf0da377e11f385a9888da3f72e827ab26.tar.xz |
batman-adv: Use enums for related constants
CodingStyle "Chapter 12: Macros, Enums and RTL" recommends to use enums
for several related constants. Internal states can be used without
defining the actual value, but all values which are visible to the
outside must be defined as before. Normal values are assigned as usual
and flags are defined by shifts of a bit.
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/hard-interface.h')
-rw-r--r-- | net/batman-adv/hard-interface.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/batman-adv/hard-interface.h b/net/batman-adv/hard-interface.h index 79e25cbb8009..442eacbc9e3a 100644 --- a/net/batman-adv/hard-interface.h +++ b/net/batman-adv/hard-interface.h @@ -22,12 +22,14 @@ #ifndef _NET_BATMAN_ADV_HARD_INTERFACE_H_ #define _NET_BATMAN_ADV_HARD_INTERFACE_H_ -#define IF_NOT_IN_USE 0 -#define IF_TO_BE_REMOVED 1 -#define IF_INACTIVE 2 -#define IF_ACTIVE 3 -#define IF_TO_BE_ACTIVATED 4 -#define IF_I_WANT_YOU 5 +enum hard_if_state { + IF_NOT_IN_USE, + IF_TO_BE_REMOVED, + IF_INACTIVE, + IF_ACTIVE, + IF_TO_BE_ACTIVATED, + IF_I_WANT_YOU +}; extern struct notifier_block hard_if_notifier; |