]> asedeno.scripts.mit.edu Git - linux.git/commit
gpio: mmio: Make pin2mask() a private business
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 20 Oct 2017 14:31:27 +0000 (16:31 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 25 Oct 2017 09:25:41 +0000 (11:25 +0200)
commit24efd94bc38290dc1d9775a1e767ed4685d8a79b
tree32e698c490b7ec9159ea16757a03c94af6341656
parentb3222f7147e028d31f965f193b6f995147c64651
gpio: mmio: Make pin2mask() a private business

The vtable call pin2mask() was introducing a vtable function call
in every gpiochip callback for a generic MMIO GPIO chip. This was
not exactly efficient. (Maybe link-time optimization could get rid of
it, I don't know.)

After removing all external calls into this API we can make it a
boolean flag in the struct gpio_chip call and sink the function into
the gpio-mmio driver yielding encapsulation and potential speedups.

Cc: Anton Vorontsov <anton@enomsg.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-mmio.c
include/linux/gpio/driver.h