]> git.baikalelectronics.ru Git - kernel.git/commit
regmap: rbtree: Simplify adjacent node look-up
authorLars-Peter Clausen <lars@metafoo.de>
Thu, 29 Aug 2013 08:26:32 +0000 (10:26 +0200)
committerMark Brown <broonie@linaro.org>
Thu, 29 Aug 2013 12:32:40 +0000 (13:32 +0100)
commita0f4c122dc1205b32eaaa5ec3f9b8d7f76a5c664
treee8d9ab3aa7b2ad8160d7a77c077b999c453440ba
parent0e48b0831c7cb5ff328cbd90d59b74b2a7518e8a
regmap: rbtree: Simplify adjacent node look-up

A register which is adjacent to a node will either be left to the first
register or right to the last register. It will not be within the node's range,
so there is no point in checking for each register cached by the node whether
the new register is next to it. It is sufficient to check whether the register
comes before the first register or after the last register of the node.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/base/regmap/regcache-rbtree.c