gpio: aggregator: Refactor ->{get, set}_multiple() to make Sparse happy
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 10 Aug 2020 11:43:53 +0000 (14:43 +0300)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 18 Aug 2020 19:39:39 +0000 (21:39 +0200)
commit01e8d85b68fdde832f762f85b0d407ba891fd5e1
tree0bacedef2d3a17ce7fe7430efa18d9ab6f96cfc3
parent329afb94e0052fd7a94652d1a14df0b8f5527413
gpio: aggregator: Refactor ->{get, set}_multiple() to make Sparse happy

Sparse can't see locking scheme used in ->get_multiple() and
->set_multiple() callbacks.
  CHECK   .../drivers/gpio/gpio-aggregator.c
  .../spinlock.h:409:9: warning: context imbalance in 'gpio_fwd_get_multiple' - unexpected unlock
  .../spinlock.h:409:9: warning: context imbalance in 'gpio_fwd_set_multiple' - unexpected unlock

Refactor them to have better readability and make Sparse happy.

Code size impact is +52 bytes with arm-linux-gnueabihf-gcc 7.5.0.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-aggregator.c