gpio: pca953x: Clean up pcal6534_check_register()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sat, 10 Dec 2022 22:06:00 +0000 (00:06 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 30 Jan 2023 14:55:27 +0000 (15:55 +0100)
commita87f901b59326c12313dbf224cc4591ae2c63785
tree46629b3e1f7f1c13f80e1a4a5c2bc406f02eb295
parentb1453d1eb93fd34848082fd181ff247f19c0ee86
gpio: pca953x: Clean up pcal6534_check_register()

The pcal6534_check_register() is a bit too verbose.
Clean up it, by deduplicating some operations and
switching to the modulo operation as on some architectures
/ and % can become a single assembly instruction.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-pca953x.c