Commit 7d8b4c2a authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Chris Ball

mmc: tmio: fix regression in TMIO_MMC_WRPROTECT_DISABLE handling

Commit b6147490 ("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: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: <stable@kernel.org>
Signed-off-by: default avatarChris Ball <cjb@laptop.org>
parent a9120c33
...@@ -824,8 +824,8 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc) ...@@ -824,8 +824,8 @@ static int tmio_mmc_get_ro(struct mmc_host *mmc)
struct tmio_mmc_host *host = mmc_priv(mmc); struct tmio_mmc_host *host = mmc_priv(mmc);
struct tmio_mmc_data *pdata = host->pdata; struct tmio_mmc_data *pdata = host->pdata;
return ((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) || return !((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) ||
!(sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)); (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT));
} }
static int tmio_mmc_get_cd(struct mmc_host *mmc) static int tmio_mmc_get_cd(struct mmc_host *mmc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment