]> git.baikalelectronics.ru Git - kernel.git/commit
staging: ks7010: add new helpers to achieve mib set request and simplify code
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Fri, 4 May 2018 04:16:24 +0000 (06:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 May 2018 01:58:38 +0000 (18:58 -0700)
commitd2efd96914f62279037f6b7c704fa15a30352ac0
tree5fb83a111ccc97a4f02e29b1669923ea06728302
parent2fa6e261cac0ad52ad7c43b5a8c9143b8db0beae
staging: ks7010: add new helpers to achieve mib set request and simplify code

New three functions have been created to centralice and simplify
calls related with set MIB requests:

    - hostif_mib_set_request_int
    - hostif_mib_set_request_bool
    - hostif_mib_set_request_ostring

Using these in different calls simplify functions related with
this mainly when types are bool and int because no more conversions
are needed in the caller functions. Those conversion details are
now located in the new helpers improving a lot readability. Calls
in hostif_sme_set_wep function has change also some if's to check
invalid value first avoiding one level indentation.

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