Re: [PATCH v3 02/12] mmc: mmc_test: add debugfs file to list all tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 7, 2011 at 10:14 PM, Per Forlin <per.forlin@xxxxxxxxxx> wrote:
> Add a debugfs file "testlist" to print all available tests
>
> Signed-off-by: Per Forlin <per.forlin@xxxxxxxxxx>
> ---
> Âdrivers/mmc/card/mmc_test.c | Â 30 ++++++++++++++++++++++++++++++
> Â1 files changed, 30 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/mmc/card/mmc_test.c b/drivers/mmc/card/mmc_test.c
> index abc1a63..c1c3c5a 100644
> --- a/drivers/mmc/card/mmc_test.c
> +++ b/drivers/mmc/card/mmc_test.c


> @@ -2476,6 +2502,10 @@ static int mmc_test_register_file_test(struct mmc_card *card)
> Â Â Â Â Â Â Â Âfile = debugfs_create_file("test", S_IWUSR | S_IRUGO,
> Â Â Â Â Â Â Â Â Â Â Â Âcard->debugfs_root, card, &mmc_test_fops_test);
>
> + Â Â Â if (card->debugfs_root)
> + Â Â Â Â Â Â Â file = debugfs_create_file("testlist", S_IRUGO,
> + Â Â Â Â Â Â Â Â Â Â Â card->debugfs_root, card, &mmc_test_fops_testlist);
> +
> Â Â Â Âif (IS_ERR_OR_NULL(file)) {
> Â Â Â Â Â Â Â Âdev_err(&card->dev,
> Â Â Â Â Â Â Â Â Â Â Â Â"Can't create file. Perhaps debugfs is disabled.\n");
I think you also need to use similar error path for both files: test
and testlist.


-- 
With Best Regards,
Andy Shevchenko
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux