From patchwork Sun Nov 28 05:21:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ohad Ben Cohen X-Patchwork-Id: 361732 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAS5JiIE007611 for ; Sun, 28 Nov 2010 05:19:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751436Ab0K1FTo (ORCPT ); Sun, 28 Nov 2010 00:19:44 -0500 Received: from mail-fx0-f46.google.com ([209.85.161.46]:57371 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751427Ab0K1FTo (ORCPT ); Sun, 28 Nov 2010 00:19:44 -0500 Received: by mail-fx0-f46.google.com with SMTP id 15so1617040fxm.19 for ; Sat, 27 Nov 2010 21:19:43 -0800 (PST) Received: by 10.223.95.199 with SMTP id e7mr3876789fan.81.1290921583825; Sat, 27 Nov 2010 21:19:43 -0800 (PST) Received: from localhost.localdomain (46-116-167-32.bb.netvision.net.il [46.116.167.32]) by mx.google.com with ESMTPS id a2sm832791faw.46.2010.11.27.21.19.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 27 Nov 2010 21:19:43 -0800 (PST) From: Ohad Ben-Cohen To: Cc: Chris Ball , Ohad Ben-Cohen Subject: [PATCH 1/3] mmc: skip detection of nonremovable cards on rescan Date: Sun, 28 Nov 2010 07:21:28 +0200 Message-Id: <1290921690-6133-2-git-send-email-ohad@wizery.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1290921690-6133-1-git-send-email-ohad@wizery.com> References: <1290921690-6133-1-git-send-email-ohad@wizery.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sun, 28 Nov 2010 05:19:45 +0000 (UTC) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 6286898..e8332d7 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1506,8 +1506,12 @@ void mmc_rescan(struct work_struct *work) mmc_bus_get(host); - /* if there is a card registered, check whether it is still present */ - if ((host->bus_ops != NULL) && host->bus_ops->detect && !host->bus_dead) + /* + * if there is a _removable_ card registered, check whether it is + * still present + */ + if ((host->bus_ops != NULL) && host->bus_ops->detect && !host->bus_dead + && mmc_card_is_removable(host)) host->bus_ops->detect(host); mmc_bus_put(host);