From patchwork Mon Jun 20 14:51:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 897592 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5KEpe8r032591 for ; Mon, 20 Jun 2011 14:51:40 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751231Ab1FTOvj (ORCPT ); Mon, 20 Jun 2011 10:51:39 -0400 Received: from moutng.kundenserver.de ([212.227.17.10]:55451 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751064Ab1FTOvj (ORCPT ); Mon, 20 Jun 2011 10:51:39 -0400 Received: from axis700.grange (dslb-088-076-027-104.pools.arcor-ip.net [88.76.27.104]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0MDCvo-1QIB9K1sYm-00GZaJ; Mon, 20 Jun 2011 16:51:14 +0200 Received: by axis700.grange (Postfix, from userid 1000) id 2253C189B83; Mon, 20 Jun 2011 16:51:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by axis700.grange (Postfix) with ESMTP id 18235189B82; Mon, 20 Jun 2011 16:51:10 +0200 (CEST) Date: Mon, 20 Jun 2011 16:51:10 +0200 (CEST) From: Guennadi Liakhovetski X-X-Sender: lyakh@axis700.grange To: linux-mmc@vger.kernel.org cc: Ian Molton , linux-sh@vger.kernel.org, Chris Ball , Magnus Damm Subject: [PATCH] mmc: tmio: fix regression: restore TMIO_MMC_WRPROTECT_DISABLE handling Message-ID: MIME-Version: 1.0 X-Provags-ID: V02:K0:+gTGGcGLgyWdep2Uohu6b8/etCtJJp7ZFHXw/dqodcN J1S6UIxKn3/Db99RvyV/yvkxwEGvB6xzKhyZci1WTE+r/UrZlO 02dpWZFuhhazqbucg/I4EKTa8djAUFNZVC+bPRuoHNsHZdBRLI 5qi522w6zGCe25Vw1ljadFtmTwWVaxBu4lcXGMXqhcQc6VL1in XYGOTwNDMMT+DWXYeU0ah0rpqKVkcwBfHZaSYD6BsU= Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 20 Jun 2011 14:51:52 +0000 (UTC) Commit b6147490e6aac82fa2f4b9d7fce925d9891ebe8f 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 --- Chris, please push for 3.0 Thanks Guennadi drivers/mmc/host/tmio_mmc_pio.c | 4 ++-- 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 ad6347b..0b09e82 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) 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)