mmc_test: collect data and show it via sysfs by demand
authorAndy Shevchenko <andy.shevchenko@gmail.com>
Wed, 1 Sep 2010 06:26:47 +0000 (09:26 +0300)
committerChris Ball <cjb@laptop.org>
Sat, 23 Oct 2010 13:11:13 +0000 (21:11 +0800)
commit3183aa1534de4e98ffb0527d4f2be7ac9f019a4e
treeb38ce66b22f1b6385ad2387278a259a46a0dccd4
parent5c25aee5364550d7fa6314886370e76cda18d7e2
mmc_test: collect data and show it via sysfs by demand

Make it possible to get test results via sysfs.  It helps to do tests
non-interactively.  We have the file created under sysfs already and
can use it to show test results.

Prior to this patch, the "test" file under each card's sysfs node was
write-only, and results were obtained by looking at dmesg.  This patch
improves programmatic access to the test results, making them available by
reading back from the same "test" file:

[root@host mmc0:e624]# echo 6 > test
[root@host mmc0:e624]# cat test
Test 6: 2

[cjb@laptop.org: changelog improvements]
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/card/mmc_test.c