]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: pca953x: refactor pca953x_write_regs()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 9 Sep 2016 09:17:35 +0000 (11:17 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 12 Sep 2016 12:46:29 +0000 (14:46 +0200)
commit31d8fdd88d7227e84ad671f855feb0c310028641
tree58e85f1f1287cb7c5066012dd26b54d5f6dfa318
parent329bab80d686833b0ef9943c8b2788e2c7ff8629
gpio: pca953x: refactor pca953x_write_regs()

Avoid the unnecessary if-else in pca953x_write_regs() by splitting
the routine into smaller, specialized functions and calling the right
one via a function pointer held in struct pca953x_chip.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pca953x.c