summaryrefslogtreecommitdiffstats
path: root/drivers/staging/ks7010/ks7010_sdio.h
diff options
context:
space:
mode:
authorTobin C. Harding <me@tobin.cc>2017-04-18 10:35:30 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-18 13:33:17 +0200
commit68711cebcbb4dd7f5c05245715eefa4f4d4be760 (patch)
treef756004bb0a096c002b587def147a88b1c12206c /drivers/staging/ks7010/ks7010_sdio.h
parentbfee6a231903b1f1f8d72cc638be6862d7099377 (diff)
downloadop-kernel-dev-68711cebcbb4dd7f5c05245715eefa4f4d4be760.zip
op-kernel-dev-68711cebcbb4dd7f5c05245715eefa4f4d4be760.tar.gz
staging: ks7010: replace defines with enum types
Header has multiple constants defined using preprocessor directive. In the cases where these are an integer progression an enumeration type can be used. Doing so adds documentation to the code and makes the usage explicit. Maintain original constant value, this value is returned by the device. Replace (integer progression) preprocessor constants with enumeration type. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ks7010/ks7010_sdio.h')
-rw-r--r--drivers/staging/ks7010/ks7010_sdio.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/staging/ks7010/ks7010_sdio.h b/drivers/staging/ks7010/ks7010_sdio.h
index 0b8b865..e9b0ad9 100644
--- a/drivers/staging/ks7010/ks7010_sdio.h
+++ b/drivers/staging/ks7010/ks7010_sdio.h
@@ -62,14 +62,18 @@ enum reg_status_type {
/* General Communication Register A */
#define GCR_A 0x000028
-#define GCR_A_INIT 0
-#define GCR_A_REMAP 1
-#define GCR_A_RUN 2
+enum gen_com_reg_a {
+ GCR_A_INIT,
+ GCR_A_REMAP,
+ GCR_A_RUN
+};
/* General Communication Register B */
#define GCR_B 0x00002C
-#define GCR_B_ACTIVE 0
-#define GCR_B_DOZE 1
+enum gen_com_reg_b {
+ GCR_B_ACTIVE,
+ GCR_B_DOZE
+};
/* Wakeup Register */
/* #define WAKEUP 0x008104 */
OpenPOWER on IntegriCloud