On Mon, Nov 16, 2015 at 6:02 AM, Bamvor Jian Zhang <bamvor.zhangjian@xxxxxxxxxx> wrote: > There are limitations for the current checker: > 1. Could not check the overlap if the new gpiochip is the secondly > gpiochip. > 2. Could not check the overlap if the new gpiochip is overlap > with the left of gpiochip. E.g. if we insert [c, d] between > [a,b] and [e, f], and e >= c + d, it will successful even if > c < a + b. > 3. Allow overlap of base of different gpiochip. > > This patch fix these issues by checking the overlap of both right and > left gpiochip in the same loop statement. > > Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@xxxxxxxxxx> Patch applied with some tweaks. Had to rebase it because I renamed ->dev to ->parent in the GPIO tree, then I found it possible to get rid of the ret variable altogether. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html