]> git.karo-electronics.de Git - mv-sheeva.git/commit
mmc_test: move files from sysfs to debugfs
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Fri, 10 Sep 2010 07:10:50 +0000 (10:10 +0300)
committerChris Ball <cjb@laptop.org>
Sat, 23 Oct 2010 13:11:13 +0000 (21:11 +0800)
commit130067ed15f6e8a1209898646878f5bc0a17d3dd
tree80108295840277210d1bdb8199d4ed60bd6b170e
parent3183aa1534de4e98ffb0527d4f2be7ac9f019a4e
mmc_test: move files from sysfs to debugfs

As proposed by Greg K-H it is more logical to keep files for the mmc_test
driver under debugfs.

Additionally this patch brings seq_file API for show() method.  It allows
to write unlimited data to the file.

Example of usage:
  # mount -t debugfs none /sys/kernel/debug
  # modprobe mmc_test
    [  581.395843] mmc_test mmc0:0001: Card claimed for testing.
  # echo 25 > /sys/kernel/debug/mmc0/mmc0\:0001/test
    [  604.568542] mmc0: Starting tests of card mmc0:0001...
    [  604.582733] mmc0: Test case 25. Best-case read performance into scattered pages...
    [  604.923553] mmc0: Transfer of 8192 sectors (4096 KiB) took 0.124664314 seconds (33644 kB/s, 32856 KiB/s)
    [  604.933227] mmc0: Result: OK
    [  604.936248] mmc0: Tests completed.
  # cat /sys/kernel/debug/mmc0/mmc0\:0001/test
    Test 25: 0
    1 8192 0.124664314 33644784

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: Greg KH <greg@kroah.com>
Cc: Adrian Hunter <adrian.hunter@nokia.com>
Cc: Chris Ball <cjb@laptop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/card/mmc_test.c