diff options
author | 2014-11-19 16:51:27 +0900 | |
---|---|---|
committer | 2014-11-28 11:28:23 +0100 | |
commit | 14e85c0e69d5c7fdbd963edbbec1dc5cdd385200 (patch) | |
tree | 1cd91d3c5bf4fd27c9e2c08290832e3c5cf2ce8a /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | gpio: mxs: implement get_direction callback (diff) | |
download | wireguard-linux-14e85c0e69d5c7fdbd963edbbec1dc5cdd385200.tar.xz wireguard-linux-14e85c0e69d5c7fdbd963edbbec1dc5cdd385200.zip |
gpio: remove gpio_descs global array
Replace the ARCH_NR_GPIOS-sized static array of GPIO descriptors by
dynamically-allocated arrays for each GPIO chip.
This change makes gpio_to_desc() perform in O(n) (where n is the number
of GPIO chips registered) instead of O(1), however since n is rarely
bigger than 1 or 2 no noticeable performance issue is expected.
Besides this provides more incentive for GPIO consumers to move to the
gpiod interface. One could use a O(log(n)) structure to link the GPIO
chips together, but considering the low limit of n the hypothetical
performance benefit is probably not worth the added complexity.
This patch uses kcalloc() in gpiochip_add(), which removes the ability
to add a chip before kcalloc() can operate. I am not aware of such
cases, but if someone bisects up to this patch then I will be proven
wrong...
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions