]> asedeno.scripts.mit.edu Git - linux.git/commit
staging: ks7010: add variables key, key_index
authorTobin C. Harding <me@tobin.cc>
Mon, 13 Mar 2017 06:38:22 +0000 (17:38 +1100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Mar 2017 22:20:06 +0000 (06:20 +0800)
commitdfe41b4f4c8d9d46a95da6959d2852757dfa8b3b
tree953f731add157589b1701d2d1ac475679ca1b995
parent1b45ba65091483cbdfae57b2afc256936e3a3d96
staging: ks7010: add variables key, key_index

'auth_type - 1' is used as an index into a key table. Adding a variable
appropriately named simplifies the code and adds meaning when
reading. Adding a pointer variable of type struct *kpa_key_t adds to
readability by removing the table access each time the key is used.

The key index is used to create a string so having it named adds
additional meaning when creating the string.

Declare variable 'key_index' and define it at declaration time. Declare
a pointer variable 'key' and define it to point to the correct key in
the key table.

Signed-off-by: Tobin C. Harding <me@tobin.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_hostif.c