diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-04-11 16:52:10 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-04-15 12:21:45 +0200 |
commit | 947fb5adf8af450507c978abf1c7ec9f051e5842 (patch) | |
tree | af790669292308b56baf188611ac430012037cba /drivers/ata | |
parent | 48b205e32342fc8a2648b2bd3f1f6d9a7d74e6cb (diff) | |
download | barebox-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/ata')
-rw-r--r-- | drivers/ata/disk_ata_drive.c | 2 | ||||
-rw-r--r-- | drivers/ata/disk_bios_drive.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/disk_ata_drive.c b/drivers/ata/disk_ata_drive.c index d30d0ad997..cd46e0cf6a 100644 --- a/drivers/ata/disk_ata_drive.c +++ b/drivers/ata/disk_ata_drive.c @@ -243,7 +243,7 @@ static int ata_port_init(struct ata_port *port) rc = cdev_find_free_index("ata"); if (rc == -1) pr_err("Cannot find a free index for the disk node\n"); - port->blk.cdev.name = asprintf("ata%d", rc); + port->blk.cdev.name = basprintf("ata%d", rc); } port->blk.num_blocks = ata_id_n_sectors(port->id); diff --git a/drivers/ata/disk_bios_drive.c b/drivers/ata/disk_bios_drive.c index 8e768dc7f2..363af3c6dd 100644 --- a/drivers/ata/disk_bios_drive.c +++ b/drivers/ata/disk_bios_drive.c @@ -258,7 +258,7 @@ static int biosdisk_probe(struct device_d *dev) rc = cdev_find_free_index("disk"); if (rc < 0) pr_err("Cannot find a free number for the disk node\n"); - m->blk.cdev.name = asprintf("disk%d", rc); + m->blk.cdev.name = basprintf("disk%d", rc); m->blk.blockbits = SECTOR_SHIFT; rc = blockdevice_register(&m->blk); |