Skip to content

Commit

Permalink
mmc: tmio: fix regression in TMIO_MMC_WRPROTECT_DISABLE handling
Browse files Browse the repository at this point in the history
Commit b614749 ("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 <[email protected]>
Cc: <[email protected]>
Signed-off-by: Chris Ball <[email protected]>
  • Loading branch information
lyakh authored and cjb committed Jun 25, 2011
1 parent a9120c3 commit 7d8b4c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mmc/host/tmio_mmc_pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_data *pdata = host->pdata;

return ((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) ||
!(sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT));
return !((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) ||
(sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT));
}

static int tmio_mmc_get_cd(struct mmc_host *mmc)
Expand Down

0 comments on commit 7d8b4c2

Please sign in to comment.