summaryrefslogtreecommitdiffstats
path: root/drivers/w1
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/w1
parent48b205e32342fc8a2648b2bd3f1f6d9a7d74e6cb (diff)
downloadbarebox-947fb5adf8af450507c978abf1c7ec9f051e5842.tar.gz
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/w1')
-rw-r--r--drivers/w1/slaves/w1_ds2431.c2
-rw-r--r--drivers/w1/slaves/w1_ds2433.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/w1/slaves/w1_ds2431.c b/drivers/w1/slaves/w1_ds2431.c
index 30e6e1d..e3e9296 100644
--- a/drivers/w1/slaves/w1_ds2431.c
+++ b/drivers/w1/slaves/w1_ds2431.c
@@ -272,7 +272,7 @@ static int ds2431_probe(struct w1_device *dev)
cdev->priv = dev;
cdev->ops = &ds2431_ops;
cdev->size = W1_F2D_EEPROM_SIZE;
- cdev->name = asprintf(DRIVERNAME"%d", ds2431_count++);
+ cdev->name = basprintf(DRIVERNAME"%d", ds2431_count++);
if (cdev->name == NULL)
return -ENOMEM;
diff --git a/drivers/w1/slaves/w1_ds2433.c b/drivers/w1/slaves/w1_ds2433.c
index a840d9a..a907c6b 100644
--- a/drivers/w1/slaves/w1_ds2433.c
+++ b/drivers/w1/slaves/w1_ds2433.c
@@ -171,7 +171,7 @@ static int ds2433_cdev_create(struct w1_device *dev, int size, int id)
cdev->priv = dev;
cdev->ops = &ds2433_ops;
cdev->size = size;
- cdev->name = asprintf("%s%d", dev->dev.driver->name, id);
+ cdev->name = basprintf("%s%d", dev->dev.driver->name, id);
if (cdev->name == NULL)
return -ENOMEM;