From patchwork Tue Jan 4 18:01:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Ball X-Patchwork-Id: 451411 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 p04HtGwY014036 for ; Tue, 4 Jan 2011 18:07:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751192Ab1ADSBQ (ORCPT ); Tue, 4 Jan 2011 13:01:16 -0500 Received: from void.printf.net ([89.145.121.20]:38747 "EHLO void.printf.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751150Ab1ADSBP (ORCPT ); Tue, 4 Jan 2011 13:01:15 -0500 Received: from chris by void.printf.net with local (Exim 4.69) (envelope-from ) id 1PaBC5-0004Z5-Og; Tue, 04 Jan 2011 18:01:13 +0000 Date: Tue, 4 Jan 2011 18:01:13 +0000 From: Chris Ball To: viresh kumar Cc: linux-mmc@vger.kernel.org, Shiraz HASHIM Subject: Re: mmc_test mmc0:0001: Can't create file. Perhaps debugfs is disabled Message-ID: <20110104180113.GA17407@void.printf.net> References: <4D11E833.7000506@st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4D11E833.7000506@st.com> 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 18:07:15 +0000 (UTC) diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index af8dc6a..63667a8 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -303,14 +303,14 @@ int mmc_add_card(struct mmc_card *card) type, card->rca); } - ret = device_add(&card->dev); - if (ret) - return ret; - #ifdef CONFIG_DEBUG_FS mmc_add_card_debugfs(card); #endif + ret = device_add(&card->dev); + if (ret) + return ret; + mmc_card_set_present(card); return 0;