summaryrefslogtreecommitdiff
path: root/drivers/power/reset
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2016-09-09 11:17:34 +0200
committerLinus Walleij <linus.walleij@linaro.org>2016-09-12 14:45:34 +0200
commit53661f3bc64a3203efad5daa6cf4c4e87c53b394 (patch)
tree80ac9f16c18ea7e74d3c0235b691e29385e42b20 /drivers/power/reset
parent14bf873e5921fd414cf6f0b31b799eeabd27dd74 (diff)
gpio: pca953x: code shrink
There are multiple places in the driver code where a switch (chip->chip_type) is used to determine the proper register offset. Unduplicate the code by adding a simple structure holding the possible offsets that differ between the pca953x and pca957x chip families and use it to avoid the checks. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/power/reset')
0 files changed, 0 insertions, 0 deletions