mmc: sdhci: clean up interrupt handling
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 25 Apr 2014 11:55:36 +0000 (12:55 +0100)
committerChris Ball <chris@printf.net>
Thu, 22 May 2014 11:26:23 +0000 (07:26 -0400)
commit41005003bcaf4ecfc80e02af01247f2670269816
tree93f8ccab520f0400ac42bb2cba73ef1e92562e4e
parentbf3b5ec66bd03d66e9ea729aaca013ea1047a797
mmc: sdhci: clean up interrupt handling

sdhci interrupt handling is a mess; there is a lot of code doing very
similar things.  Let's clean this up a bit:

1. set's clear down cmd, data and bus power interrupts in one go - we're
   always going to handle these.
2. use a do { } while () loop for looping while there are pending
   interrupts.
3. group clearing of bits in intmask into one place.

This results in the code becoming simpler and easier to read.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Markus Pargmann <mpa@pengutronix.de>
Tested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
drivers/mmc/host/sdhci.c