mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-09-28 19:20:30 +00:00
gpiolib: rewrite gpiodev_add_to_list
The original code of gpiodev_add_to_list is not very clear which lead to bugs or compiling warning, reference the following patches: Bugs: 1. Commitef7c755303("gpiolib: improve overlap check of range of gpio"). 2. Commit96098df125("gpiolib: fix chip order in gpio list") Warning: 1. Commite28ecca6ea("gpio: fix warning about iterator"). of gpio"). There is a off-list discussion about how to improve it consequently. This commit try to follow this by rewriting the whole functions. Tested pass with my gpio mockup driver and test scripts[1]. [1] http://www.spinics.net/lists/linux-gpio/msg09598.html Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
24030d9d95
commit
a961f9b472
1 changed files with 25 additions and 40 deletions
Loading…
Add table
Add a link
Reference in a new issue