Skip to content
Commit a961f9b4 authored by Bamvor Jian Zhang's avatar Bamvor Jian Zhang Committed by Linus Walleij
Browse files

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.  Commit ef7c7553 ("gpiolib: improve overlap check of range of
    gpio").
2.  Commit 96098df1 ("gpiolib: fix chip order in gpio list")

Warning:
1.  Commit e28ecca6 ("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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarBamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 24030d9d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment