aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2011-06-20 10:51:10 -0400
committerChris Ball <cjb@laptop.org>2011-06-25 18:52:15 -0400
commit7d8b4c2a4b73da8e3632603691838ca5b2a8c26d (patch)
treec9f4bf96c6250ebb72b6c30936d7f06a10e3382c /drivers
parenta9120c33ffbb0b3448d833dae392edc90d6cfac2 (diff)
mmc: tmio: fix regression in TMIO_MMC_WRPROTECT_DISABLE handling
Commit b6147490e6aac82 ("mmc: tmio: split core functionality, DMA and MFD glue") broke handling of the TMIO_MMC_WRPROTECT_DISABLE flag by the tmio-mmc driver. This patch restores the original behaviour. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Cc: <stable@kernel.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/tmio_mmc_pio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
index ad6347bb02dd..0b09e8239aa0 100644
--- a/drivers/mmc/host/tmio_mmc_pio.c
+++ b/drivers/mmc/host/tmio_mmc_pio.c
@@ -824,8 +824,8 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc)
824 struct tmio_mmc_host *host = mmc_priv(mmc); 824 struct tmio_mmc_host *host = mmc_priv(mmc);
825 struct tmio_mmc_data *pdata = host->pdata; 825 struct tmio_mmc_data *pdata = host->pdata;
826 826
827 return ((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) || 827 return !((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) ||
828 !(sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)); 828 (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT));
829} 829}
830 830
831static int tmio_mmc_get_cd(struct mmc_host *mmc) 831static int tmio_mmc_get_cd(struct mmc_host *mmc)