ASoC: soc-cache: Cache a pointer to the last accessed rbnode
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>
Thu, 19 May 2011 12:45:30 +0000 (13:45 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 20 May 2011 10:22:06 +0000 (11:22 +0100)
commit7e146b55866d1176f80439fdc2be2915147468b3
tree78409086ae8f445e6e8ce9e0997df3523a4f647a
parent0944cc392e9a41dd36b65b2f8cb31dff437a9fdb
ASoC: soc-cache: Cache a pointer to the last accessed rbnode

Whenever we are doing a read or a write through the rbtree code, we'll
cache a pointer to the rbnode.  To avoid looking up the register
everytime we do a read or a write, we first check if it can be found in
the cached register block, otherwise we traverse the rbtree and finally
cache the rbnode for future use.

Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-cache.c