gpio: mockup: add helpers for accessing the gpio ranges
authorBartosz Golaszewski <brgl@bgdev.pl>
Mon, 27 Nov 2017 10:48:54 +0000 (11:48 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Sat, 2 Dec 2017 21:42:31 +0000 (22:42 +0100)
commitcd9835f1c67712412be6781157a811b0f177d545
treee1db257ddae3c56b0fa369088ba528a27839acbd
parente63a006f704ba11928a8393e07a35a5f7d07290c
gpio: mockup: add helpers for accessing the gpio ranges

In order to avoid repeating the calculations on every access - add
helpers for gpio base and ngpio components of the ranges array.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mockup.c