aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorBartosz Golaszewski <[email protected]>2016-09-09 11:17:34 +0200
committerLinus Walleij <[email protected]>2016-09-12 14:45:34 +0200
commit53661f3bc64a3203efad5daa6cf4c4e87c53b394 (patch)
tree80ac9f16c18ea7e74d3c0235b691e29385e42b20 /tools/perf/scripts/python
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 <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions