gpio: pca953x: Swap if statements to save later complexity
authorMartyn Welch <martyn.welch@collabora.com>
Wed, 14 Sep 2022 15:15:56 +0000 (16:15 +0100)
committerBartosz Golaszewski <brgl@bgdev.pl>
Thu, 15 Sep 2022 08:08:44 +0000 (10:08 +0200)
commit5faf9801d4be7a079062b2ece493ae6e9e38c828
tree5ed60bcc938a048386162a636b056b47124bd27f
parentb122624ab91705d30354f0397b1eea931c6b1933
gpio: pca953x: Swap if statements to save later complexity

A later patch in the series adds support for a further chip type that
shares some similarity with the PCA953X_TYPE. In order to keep the logic
simple, swap over the if and else portions where checks are made against
PCA953X_TYPE and instead check for PCA957X_TYPE.

Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpio-pca953x.c