mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
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. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Tested-by: Chris Ball <cjb@laptop.org> Signed-off-by: Chris Ball <cjb@laptop.org>
This commit is contained in:
parent
b37427b0a4
commit
1a2727e987
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue