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>
This commit is contained in:
Andy Shevchenko 2022-12-11 00:06:00 +02:00 • committed by Bartosz Golaszewski
commit a87f901b59