summaryrefslogtreecommitdiff
path: root/scripts/prune-kernel
diff options
context:
space:
mode:
authorTobin C. Harding <me@tobin.cc>2017-04-27 11:25:19 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-28 11:47:26 +0200
commit0e24eb8abf93a2e80ecbe97419d2d1fe089a7386 (patch)
tree843ed6348df2a10d81ff508083f646e993ee9591 /scripts/prune-kernel
parent11ce16da7b0f5335c7622ccc7c8151a387b44853 (diff)
staging: ks7010: abstract connection status
Host interface connection status is handled using a 32 bit type. Top byte is used as for FORCE_DISCONNECT status, low bits are used for connect/disconnect status. Driver masks and checks integers to ascertain status. If functions are defined to do the masking and equality check then the details of how the status integer is used are abstracted away. This makes the code easier to read. Also future updates to the status handling will be easier because the code is in one place. Driver currently uses the CONNECT_STATUS and DISCONNECT_STATUS as values, as apposed to opaque values. Because of this driver code checks for equality with CONNECT_STATUS and DISCONNECT_STATUS as apposed to negating a single check (ie 'foo != CONNECT_STATUS). In order to maintain the current functionality we define two separate functions is_connect_status() and is_disconnect_status(). Add functions to abstract the status integer check. Update all sites that do the check manually to use the newly defined functions. Signed-off-by: Tobin C. Harding <me@tobin.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/prune-kernel')
0 files changed, 0 insertions, 0 deletions