]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: pca953x: refactor pca953x_read_regs()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 9 Sep 2016 09:17:36 +0000 (11:17 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 12 Sep 2016 12:46:54 +0000 (14:46 +0200)
commit0fbfeb2f04aa22d6c449508ce9f3d99801a051ea
treefd9cfc12d752f33b2563fbcce7f84a61b97f5007
parentacfdb21115d3be9b0f96167ba865977f196dd6e6
gpio: pca953x: refactor pca953x_read_regs()

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

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