ARM: PL08x: clean up LLI lookup
authorRussell King - ARM Linux <linux@arm.linux.org.uk>
Mon, 3 Jan 2011 22:38:32 +0000 (22:38 +0000)
committerDan Williams <dan.j.williams@intel.com>
Wed, 5 Jan 2011 03:16:12 +0000 (19:16 -0800)
commitdb9f136a60c8727c8e1c9c4f2494821caebf5a7b
treed5311b870e634541e787a680d6d77bf9865f9645
parentbfddfb45056fa95a778f0baf463ac0f9fc926d5c
ARM: PL08x: clean up LLI lookup

As the LLI list is an array, we can use maths to locate which LLI
index we're currently at, and then sum up the remaining LLI entries
until we reach the end of the list.

This makes the code much easier to read, and much less susceptible
to falling off the end of the array.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/amba-pl08x.c