]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: pca953x: Rewrite ->get_multiple() function
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 20 Apr 2020 17:27:50 +0000 (20:27 +0300)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Wed, 29 Apr 2020 11:19:38 +0000 (13:19 +0200)
commitef75e704f236f7baebf2498f3255e941e7ed2123
tree8b84d3fff6d004f075f4a487dc20032be367c90b
parent3dfb4171d76449e0525b76011a274d10b01b6c5f
gpio: pca953x: Rewrite ->get_multiple() function

The commit badc32c37e2a ("gpio: gpio-pca953x, Add get_multiple function")
basically did everything wrong from style and code reuse perspective, i.e.
- it didn't utilize existing PCA953x internal helpers
- it didn't utilize bitmap API
- it misses the point that ilog2(), besides that BANK_SFT is useless,
  can be used in macros
- it has indentation issues.

Rewrite the function completely.

Cc: Paul Thomas <pthomas8589@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-pca953x.c