diff options
author | Venkatraman S <svenkatr@ti.com> | 2012-08-07 09:59:06 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-09-04 13:58:21 -0400 |
commit | 6780162c0097915dbc4e8fc11af662a270093d85 (patch) | |
tree | d7c3bd46195d2252a15e1543e0129e30ca37020d | |
parent | 211d4fe580735bab850d31f9e4c0a62b47a38bb2 (diff) |
mmc: debugfs: Print ext_csd in ascending order
ext_csd exported through debugfs is printed in reverse order (from
byte 511 to 0), which causes confusion.
Fix the for loop to print ext_csd in natural order.
Signed-off-by: Venkatraman S <svenkatr@ti.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r-- | drivers/mmc/core/debugfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c index 9ab5b17d488a..d96c643dde1c 100644 --- a/drivers/mmc/core/debugfs.c +++ b/drivers/mmc/core/debugfs.c | |||
@@ -281,7 +281,7 @@ static int mmc_ext_csd_open(struct inode *inode, struct file *filp) | |||
281 | if (err) | 281 | if (err) |
282 | goto out_free; | 282 | goto out_free; |
283 | 283 | ||
284 | for (i = 511; i >= 0; i--) | 284 | for (i = 0; i < 512; i++) |
285 | n += sprintf(buf + n, "%02x", ext_csd[i]); | 285 | n += sprintf(buf + n, "%02x", ext_csd[i]); |
286 | n += sprintf(buf + n, "\n"); | 286 | n += sprintf(buf + n, "\n"); |
287 | BUG_ON(n != EXT_CSD_STR_LEN); | 287 | BUG_ON(n != EXT_CSD_STR_LEN); |