]> git.baikalelectronics.ru Git - kernel.git/commit
staging: ks7010: avoid some if-else code in get_current_ap function
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Tue, 24 Apr 2018 13:49:50 +0000 (15:49 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 13:50:18 +0000 (15:50 +0200)
commit533b9f963567acaf561fe02d921789e6136083c9
tree1bde8379221d49718ab0b0e47ff61a6bb855138f
parent9db449862a798c849bfa6f8f56bab55d8d6a75fe
staging: ks7010: avoid some if-else code in get_current_ap function

This commits avoid some if-else code extracting common code before
its use and making use of a new variable 'size' which is assigned
using a ternary operator. This improves readability.

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