From: Russell King - ARM Linux Date: Mon, 3 Jan 2011 22:31:04 +0000 (+0000) Subject: ARM: PL08x: fix atomic_t usage and tx_submit() return value range X-Git-Tag: v2.6.38-rc1~25^2~11^2~45 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=91aa5fadb831e7b6ea473a526a6b49c6dc4819ce;p=pandora-kernel.git ARM: PL08x: fix atomic_t usage and tx_submit() return value range The last_issued variable uses an atomic type, which is only incremented inside a protected region, and then read. Everywhere else only reads the value, so it isn't using atomic_t correctly, and it doesn't even need to. Moreover, the DMA engine code provides us with a variable for this already - chan.cookie. Use chan.cookie instead. Also, avoid negative dma_cookie_t values - negative returns from tx_submit() mean failure, yet in reality we always succeed. Restart from cookie 1, just like other DMA engine drivers do. Signed-off-by: Russell King Acked-by: Linus Walleij Signed-off-by: Dan Williams --- Reading git-diff-tree failed