From patchwork Thu Dec 5 13:34:47 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 3288211 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2F2129F373 for ; Thu, 5 Dec 2013 13:35:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1817F203E5 for ; Thu, 5 Dec 2013 13:35:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D1F15203E3 for ; Thu, 5 Dec 2013 13:35:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932203Ab3LENfT (ORCPT ); Thu, 5 Dec 2013 08:35:19 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:49794 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932218Ab3LENfS (ORCPT ); Thu, 5 Dec 2013 08:35:18 -0500 Received: from dude.hi.pengutronix.de ([2001:6f8:1178:2:21e:67ff:fe11:9c5c]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1VoZ4v-000682-3V; Thu, 05 Dec 2013 14:34:53 +0100 Received: from sha by dude.hi.pengutronix.de with local (Exim 4.80) (envelope-from ) id 1VoZ4u-0002oO-6I; Thu, 05 Dec 2013 14:34:52 +0100 From: Sascha Hauer To: linux-mmc@vger.kernel.org Cc: Chris Ball , , Sascha Hauer Subject: [PATCH 2/6] mmc: mxs: use standard flag for non-removable status Date: Thu, 5 Dec 2013 14:34:47 +0100 Message-Id: <1386250491-4708-3-git-send-email-s.hauer@pengutronix.de> X-Mailer: git-send-email 1.8.4.3 In-Reply-To: <1386250491-4708-1-git-send-email-s.hauer@pengutronix.de> References: <1386250491-4708-1-git-send-email-s.hauer@pengutronix.de> X-SA-Exim-Connect-IP: 2001:6f8:1178:2:21e:67ff:fe11:9c5c X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-mmc@vger.kernel.org Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The standard caps already have a MMC_CAP_NONREMOVABLE flag. Use it rather than a custom non_removable flag. Signed-off-by: Sascha Hauer --- drivers/mmc/host/mxs-mmc.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 50fc9df..374fca7 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -73,7 +73,6 @@ struct mxs_mmc_host { bool wp_inverted; bool cd_inverted; bool broken_cd; - bool non_removable; }; static int mxs_mmc_get_ro(struct mmc_host *mmc) @@ -97,7 +96,7 @@ static int mxs_mmc_get_cd(struct mmc_host *mmc) struct mxs_mmc_host *host = mmc_priv(mmc); struct mxs_ssp *ssp = &host->ssp; - return host->non_removable || host->broken_cd || + return host->broken_cd || !(readl(ssp->base + HW_SSP_STATUS(ssp)) & BM_SSP_STATUS_CARD_DETECT) ^ host->cd_inverted; } @@ -654,8 +653,7 @@ static int mxs_mmc_probe(struct platform_device *pdev) else if (bus_width == 8) mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; host->broken_cd = of_property_read_bool(np, "broken-cd"); - host->non_removable = of_property_read_bool(np, "non-removable"); - if (host->non_removable) + if (of_property_read_bool(np, "non-removable")) mmc->caps |= MMC_CAP_NONREMOVABLE; host->wp_gpio = of_get_named_gpio_flags(np, "wp-gpios", 0, &flags); if (flags & OF_GPIO_ACTIVE_LOW)