diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-04-11 14:02:01 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-04-12 10:41:00 +0200 |
commit | f840b33a2dec902002ca40c0af4aaa768cb38289 (patch) | |
tree | 87505e2daa044e29307c8dd43ee81ed45d90ad4e | |
parent | 342c8de8f58ba666c5539ad5b004b51ce8592deb (diff) | |
download | barebox-f840b33a2dec902002ca40c0af4aaa768cb38289.tar.gz barebox-f840b33a2dec902002ca40c0af4aaa768cb38289.tar.xz |
mci: shrink string footprint
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | drivers/mci/mci-core.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index a3ad8094bf..a51c44bf9e 100644 --- a/drivers/mci/mci-core.c +++ b/drivers/mci/mci-core.c @@ -599,6 +599,7 @@ static void mci_detect_version_from_csd(struct device_d *mci_dev) { struct mci *mci = GET_MCI_DATA(mci_dev); int version; + char *vstr; if (mci->version == MMC_VERSION_UNKNOWN) { /* the version is coded in the bits 127:126 (left aligned) */ @@ -606,30 +607,31 @@ static void mci_detect_version_from_csd(struct device_d *mci_dev) switch (version) { case 0: - printf("Detecting a 1.2 revision card\n"); + vstr = "1.2"; mci->version = MMC_VERSION_1_2; break; case 1: - printf("Detecting a 1.4 revision card\n"); + vstr = "1.4"; mci->version = MMC_VERSION_1_4; break; case 2: - printf("Detecting a 2.2 revision card\n"); + vstr = "2.2"; mci->version = MMC_VERSION_2_2; break; case 3: - printf("Detecting a 3.0 revision card\n"); + vstr = "3.0"; mci->version = MMC_VERSION_3; break; case 4: - printf("Detecting a 4.0 revision card\n"); + vstr = "4.0"; mci->version = MMC_VERSION_4; break; default: - printf("Unknow revision. Falling back to a 1.2 revision card\n"); + vstr = "unknown, fallback to 1.2"; mci->version = MMC_VERSION_1_2; break; } + printf("detected card version %s\n", vstr); } } |