summaryrefslogtreecommitdiff
path: root/drivers/staging/ks7010/ks_hostif.h
diff options
context:
space:
mode:
authorTobin C. Harding <me@tobin.cc>2017-04-27 04:25:20 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-28 12:47:26 +0300
commit63c31af3e5efa8ebe0aaa60de183fb94989420f8 (patch)
treeb3e0c2190e7c43e973369e14b14b843364f89a3d /drivers/staging/ks7010/ks_hostif.h
parent0e24eb8abf93a2e80ecbe97419d2d1fe089a7386 (diff)
downloadlinux-63c31af3e5efa8ebe0aaa60de183fb94989420f8.tar.xz
staging: ks7010: add enum sleep_mode_type
Driver uses preprocessor directives to define SLP_ASLEEP and SLP_ACTIVE. These can be defined using an enumeration type. Doing so adds to the readability and gives the usual compiler benefits of having an enum. Functions that currently accept integer types can now use the new enumeration type, further aiding readability. Add enumeration type sleep_mode_type. Update code that handles sleep mode to use the new 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/ks_hostif.h')
-rw-r--r--drivers/staging/ks7010/ks_hostif.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/ks7010/ks_hostif.h b/drivers/staging/ks7010/ks_hostif.h
index d773432b1be3..97f01925257f 100644
--- a/drivers/staging/ks7010/ks_hostif.h
+++ b/drivers/staging/ks7010/ks_hostif.h
@@ -542,9 +542,11 @@ struct hostif_phy_information_confirm_t {
u32 rx_error;
} __packed;
-/* sleep mode */
-#define SLP_ACTIVE 0
-#define SLP_SLEEP 1
+enum sleep_mode_type {
+ SLP_ACTIVE,
+ SLP_SLEEP
+};
+
struct hostif_sleep_request_t {
struct hostif_hdr header;
} __packed;