summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ks7010
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2018-05-04 06:16:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-06 18:58:38 -0700
commit7cc4ca5de65822d8d63a2c3c97162d47faa7fcb3 (patch)
tree15def69303ca60c9a71a518d4b4ff4352f8293b2 /drivers/staging/ks7010
parentf398c5f4de79b851c1362d3ee8f4fd5e2713fab0 (diff)
downloadlinux-7cc4ca5de65822d8d63a2c3c97162d47faa7fcb3.tar.bz2
staging: ks7010: convert MIB preprocessor defs into an enum
This commit just change some preprocessor definitions related with MIB data types into an enumeration which is much cleaner for this here. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ks7010')
-rw-r--r--drivers/staging/ks7010/ks_hostif.h21
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index 974e639560e0..a913e0269fff 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -135,14 +135,25 @@ struct hostif_mib_get_request {
__le32 mib_attribute;
} __packed;
+/**
+ * enum mib_data_type - Message Information Base data type.
+ * @MIB_VALUE_TYPE_NULL: NULL type
+ * @MIB_VALUE_TYPE_INT: INTEGER type
+ * @MIB_VALUE_TYPE_BOOL: BOOL type
+ * @MIB_VALUE_TYPE_COUNT32: unused
+ * @MIB_VALUE_TYPE_OSTRING: Chunk of memory
+ */
+enum mib_data_type {
+ MIB_VALUE_TYPE_NULL = 0,
+ MIB_VALUE_TYPE_INT,
+ MIB_VALUE_TYPE_BOOL,
+ MIB_VALUE_TYPE_COUNT32,
+ MIB_VALUE_TYPE_OSTRING
+};
+
struct hostif_mib_value {
__le16 size;
__le16 type;
-#define MIB_VALUE_TYPE_NULL 0
-#define MIB_VALUE_TYPE_INT 1
-#define MIB_VALUE_TYPE_BOOL 2
-#define MIB_VALUE_TYPE_COUNT32 3
-#define MIB_VALUE_TYPE_OSTRING 4
u8 body[0];
} __packed;