diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-05-25 08:09:31 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-05-31 11:27:19 +0300 |
commit | cd8f61f1e52b33766639e28a042d717d1e069d4f (patch) | |
tree | 801bb36205960e6c26028de592a15a2bd54d36c6 /drivers/pinctrl/pinconf.c | |
parent | cf9d994dcf00c09c73eb686e239ab6449a248719 (diff) | |
download | linux-cd8f61f1e52b33766639e28a042d717d1e069d4f.tar.xz |
pinctrl: copy per-pin driver private data to struct pin_desc
Currently, struct pinctrl_pin_desc can have per-pin driver private
data, but it is not copied to struct pin_desc.
For a driver with sparse pin space, for-loop search like below would
be necessary in order to get the driver-specific data for a desired
pin number.
for (i = 0; i < pctldev->desc->npins; i++)
if (pin_number == pctldev->desc->pins[i].number)
return pctldev->desc->pins[i].drv_data;
This is not efficient for a driver with a large number of pins.
So, copy the data to struct pin_desc when each pin is registered
for the faster radix tree lookup.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinconf.c')
0 files changed, 0 insertions, 0 deletions