From patchwork Thu Dec 5 13:34:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sascha Hauer X-Patchwork-Id: 3288191 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 9FBEA9F373 for ; Thu, 5 Dec 2013 13:35:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 13360203E5 for ; Thu, 5 Dec 2013 13:35:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 68738203E3 for ; Thu, 5 Dec 2013 13:35:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932198Ab3LENfE (ORCPT ); Thu, 5 Dec 2013 08:35:04 -0500 Received: from metis.ext.pengutronix.de ([92.198.50.35]:49777 "EHLO metis.ext.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932203Ab3LENfC (ORCPT ); Thu, 5 Dec 2013 08:35:02 -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-000681-3Y; 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-0002oJ-5g; Thu, 05 Dec 2013 14:34:52 +0100 From: Sascha Hauer To: linux-mmc@vger.kernel.org Cc: Chris Ball , , Sascha Hauer Subject: [PATCH 1/6] mmc: Do not call get_cd for non removable cards Date: Thu, 5 Dec 2013 14:34:46 +0100 Message-Id: <1386250491-4708-2-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 Non removable cards are always present, so do not call get_cd for them. Signed-off-by: Sascha Hauer Acked-by: Ulf Hansson --- drivers/mmc/core/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 57a2b40..098374b 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2460,7 +2460,8 @@ void mmc_rescan(struct work_struct *work) */ mmc_bus_put(host); - if (host->ops->get_cd && host->ops->get_cd(host) == 0) { + if (!(host->caps & MMC_CAP_NONREMOVABLE) && host->ops->get_cd && + host->ops->get_cd(host) == 0) { mmc_claim_host(host); mmc_power_off(host); mmc_release_host(host);