All of lore.kernel.org
 help / color / mirror / Atom feed
From: viresh kumar <viresh.kumar@st.com>
To: Chris Ball <cjb@laptop.org>
Cc: "linux-mmc@vger.kernel.org" <linux-mmc@vger.kernel.org>,
	Shiraz HASHIM <shiraz.hashim@st.com>
Subject: Re: mmc_test mmc0:0001: Can't create file. Perhaps debugfs is	disabled
Date: Wed, 5 Jan 2011 09:07:07 +0530	[thread overview]
Message-ID: <4D23E763.7060402@st.com> (raw)
In-Reply-To: <20110104180113.GA17407@void.printf.net>

On 01/04/2011 11:31 PM, Chris Ball wrote:
> Thanks, I've reproduced this now.  It's a bug.  The reason I hadn't seen
> it before is that my workflow is always to insert a card, then rmmod
> mmc_block && modprobe mmc_test -- this works because the debugfs dir is
> created late on the initial insertion, but still before mmc_test loads.
> I compiled a kernel with MMC and mmc_test built in, and no mmc_block
> support, and hit your bug.  
> 
> Here's your patch: could you send a Signed-off-by: line for it, please?
> 

Chris,

Actually i am bit new to LKML and i don't know if i should send the patch again
with signed-off or simply send a signed-off: in a similar way as we send
Acked-by:. Please tell me if i need to resend patch.

> From: Viresh Kumar <viresh.kumar@st.com>
> Date: Tue, 4 Jan 2011 12:55:14 -0500
> Subject: [PATCH] mmc: register debugfs dir before calling card probe function
> 
> This way, the probe function may register debugfs files if it wants to.
> 
> This fixes a bug with mmc_test where mmc_test_register_file_test() is
> called before the card's debugfs dir exists, and so it fails.
> ---
>  drivers/mmc/core/bus.c |    8 ++++----
>  1 files changed, 4 insertions(+), 4 deletions(-)
> 
> 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;

Signed-off-by: Viresh Kumar <viresh.kumar@st.com>

-- 
viresh

  reply	other threads:[~2011-01-05  3:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-22 11:59 mmc_test mmc0:0001: Can't create file. Perhaps debugfs is disabled viresh kumar
2011-01-04 18:01 ` Chris Ball
2011-01-05  3:37   ` viresh kumar [this message]
2011-01-05  3:48     ` Chris Ball

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D23E763.7060402@st.com \
    --to=viresh.kumar@st.com \
    --cc=cjb@laptop.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=shiraz.hashim@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.