mmc: sdhci: introduce get_ro private write-protect hook
authorWolfram Sang <w.sang@pengutronix.de>
Fri, 15 Oct 2010 10:21:01 +0000 (12:21 +0200)
committerChris Ball <cjb@laptop.org>
Sat, 23 Oct 2010 13:11:21 +0000 (21:11 +0800)
commit2dfb579c7da171f6153cd58e8fbf7dcfe684778d
treee54663068118de6dcd2d48fe6894d37c0a02bdbc
parentd3b993dcc11cd291e6908ed02b9db99970220952
mmc: sdhci: introduce get_ro private write-protect hook

Some controllers handle their write-protection differently. Introduce a
callback to be able to handle it, ensuring the same locking takes place
for it. Rename the status variable to make it more obvious why the read
from the registers needs to be inverted.

Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Tested-by: Eric BĂ©nard <eric@eukrea.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci.c
drivers/mmc/host/sdhci.h