summaryrefslogtreecommitdiffstats
path: root/drivers/mci/mci-core.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-04-11 16:52:10 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-15 12:21:45 +0200
commit947fb5adf8af450507c978abf1c7ec9f051e5842 (patch)
treeaf790669292308b56baf188611ac430012037cba /drivers/mci/mci-core.c
parent48b205e32342fc8a2648b2bd3f1f6d9a7d74e6cb (diff)
downloadbarebox-947fb5adf8af450507c978abf1c7ec9f051e5842.tar.gz
barebox-947fb5adf8af450507c978abf1c7ec9f051e5842.tar.xz
string: Fix (v)asprintf prototypes
Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/mci-core.c')
-rw-r--r--drivers/mci/mci-core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 24f57f9da9..59f66757d9 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -506,8 +506,8 @@ static int mmc_change_freq(struct mci *mci)
char *name, *partname;
part_size = mci->ext_csd[EXT_CSD_BOOT_MULT] << 17;
- partname = asprintf("boot%d", idx);
- name = asprintf("%s.%s", mci->cdevname, partname);
+ partname = basprintf("boot%d", idx);
+ name = basprintf("%s.%s", mci->cdevname, partname);
mci_part_add(mci, part_size,
EXT_CSD_PART_CONFIG_ACC_BOOT0 + idx,
name, partname, idx, true,
@@ -1626,7 +1626,7 @@ static int mci_card_probe(struct mci *mci)
mci->cdevname = strdup(host->devname);
} else {
disknum = cdev_find_free_index("disk");
- mci->cdevname = asprintf("disk%d", disknum);
+ mci->cdevname = basprintf("disk%d", disknum);
}
rc = mci_startup(mci);