]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
gpiolib: Separate GPIO_GET_LINEINFO_WATCH_IOCTL conditional
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 25 May 2020 19:40:28 +0000 (22:40 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 27 May 2020 14:16:05 +0000 (16:16 +0200)
commita34d5e56315007519f6c748e3ca0cb367264bbda
treedfba174873c9ce87b829db053de3d6634172e208
parentce1d966a302229a88bcb4398a5ca76d657b06848
gpiolib: Separate GPIO_GET_LINEINFO_WATCH_IOCTL conditional

We already have two conditionals inside the outer one to check
if the command is GPIO_GET_LINEINFO_WATCH_IOCTL. I think it's
time to actually do what I have proposed in the first place, i.e.
to separate GPIO_GET_LINEINFO_WATCH_IOCTL from GPIO_GET_LINEINFO_IOCTL.
It's +13 LOCs, and surprisingly only +13 bytes of binary on x86_32,
but for the price of much better readability.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Link: https://lore.kernel.org/r/20200525194028.74236-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c