summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-max7301.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2021-10-04 15:45:45 +0300
committerBartosz Golaszewski <brgl@bgdev.pl>2021-10-13 17:19:23 +0300
commitaa4858eb8264358e9c18c3ad79d6ab4fdc71e0c2 (patch)
treee5cbe3a8f8a54d9f82d2ba3f7b1bdcab220a678c /drivers/gpio/gpio-max7301.c
parent7687a5b0ee9358c96d85db58bad2a3aebee562b7 (diff)
downloadlinux-aa4858eb8264358e9c18c3ad79d6ab4fdc71e0c2.tar.xz
gpio: aggregator: Wrap access to gpiochip_fwd.tmp[]
The tmp[] member of the gpiochip_fwd structure is used to store both the temporary values bitmap and the desc pointers for operations on multiple GPIOs. As both are arrays with sizes unknown at compile-time, accessing them requires offset calculations, which are currently duplicated in gpio_fwd_get_multiple() and gpio_fwd_set_multiple(). Introduce (a) accessors for both arrays and (b) a macro to calculate the needed storage size. This confines the layout of the tmp[] member into a single spot, to ease maintenance. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'drivers/gpio/gpio-max7301.c')
0 files changed, 0 insertions, 0 deletions