ARM: 7721/1: mmc: mmci: Fixup regulator handling for vqmmc
authorUlf Hansson <ulf.hansson@linaro.org>
Tue, 14 May 2013 12:53:10 +0000 (13:53 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 22 May 2013 23:07:07 +0000 (00:07 +0100)
commit7c0136ef773c206e242b9718740377a45747bd70
tree3daf9f446fbfd8f5b359a57987b629202548aaf4
parent1fd83f0ecf87e33ab560e8229842cf10f91552ee
ARM: 7721/1: mmc: mmci: Fixup regulator handling for vqmmc

We can not rely on regulator_is_enabled to decide whether to
enable|disable the regulator. It would mean that the reference
counter for it is not balanced properly.

Instead keep track of our internal state by using a new flag in
the host struct, so we can take correct decisions.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/mmc/host/mmci.c
drivers/mmc/host/mmci.h