staging: vt6656: Refactor the vnt_set_bss_mode function
authorOscar Carter <oscar.carter@gmx.com>
Wed, 29 Apr 2020 15:23:07 +0000 (17:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 5 May 2020 10:26:43 +0000 (12:26 +0200)
commit91387f5eb9fc22fe81bb09d6a97396da9d1e3967
treebd3f224151177a395c89b3586721a6802fa6279c
parent35452e10610617abd0e84389fa9271421bf6425d
staging: vt6656: Refactor the vnt_set_bss_mode function

Remove all the duplicate code in the "if, else if, else" statements as
all the branches in every "if" are almost the same. The only difference
between branches is some value. So, use variables instead of repeat
code.

Also, remove the unnecessary casting to u8 type because the
"priv->bb_type" variable is already an u8 tpe.

Signed-off-by: Oscar Carter <oscar.carter@gmx.com>
Link: https://lore.kernel.org/r/20200429152307.5871-3-oscar.carter@gmx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vt6656/card.c