From patchwork Tue Jan 4 17:27:38 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 451321 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 p04HdrFh011103 for ; Tue, 4 Jan 2011 17:42:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752231Ab1ADR1m (ORCPT ); Tue, 4 Jan 2011 12:27:42 -0500 Received: from void.printf.net ([89.145.121.20]:44093 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751671Ab1ADR1l (ORCPT ); Tue, 4 Jan 2011 12:27:41 -0500 Received: from chris by void.printf.net with local (Exim 4.69) (envelope-from ) id 1PaAfa-0004RT-JC; Tue, 04 Jan 2011 17:27:38 +0000 Date: Tue, 4 Jan 2011 17:27:38 +0000 From: Chris Ball To: Andy Ross , linux-mmc@vger.kernel.org Subject: Re: [PATCH] Fix sd/sdio/mmc initialization frequency retries Message-ID: <20110104172738.GA16940@void.printf.net> References: <4D1A1B19.8000902@windriver.com> <20101231044942.GC19122@void.printf.net> <4D221748.5040701@windriver.com> <20110104012901.GA8788@void.printf.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110104012901.GA8788@void.printf.net> User-Agent: Mutt/1.5.18 (2008-05-17) 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]); Tue, 04 Jan 2011 17:43:37 +0000 (UTC) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 286e6ce..b8e3b97 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1529,13 +1529,15 @@ void mmc_rescan(struct work_struct *work) */ if (host->bus_ops && host->bus_ops->detect && !host->bus_dead && mmc_card_is_removable(host)) host->bus_ops->detect(host); + /* + * Let mmc_bus_put() free the bus/bus_ops if we've found that + * the card is no longer present. + */ mmc_bus_put(host); - - mmc_bus_get(host); /* if there still is a card present, stop here */ if (host->bus_ops != NULL) { mmc_bus_put(host);