]> git.baikalelectronics.ru Git - kernel.git/commit
staging: ks7010: refactor ks_wlan_set_sleep_mode function
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Fri, 4 May 2018 04:16:41 +0000 (06:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 May 2018 01:58:40 +0000 (18:58 -0700)
commit8928582c4824f8d25584ab3419d23c97812858a5
tree70458264796fb2d4eb36a19c5b6c2c25b30e4c8c
parentab91a7ae05865b0b53e4ecf473272a534241662d
staging: ks7010: refactor ks_wlan_set_sleep_mode function

This commit refactors ks_wlan_set_sleep_mode function
avoiding to use switch-case statement ans using simple
if logic to handle invalid values first. This simplifies
data paths as well as improves readability.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ks7010/ks_wlan_net.c