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/pci | |
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/pci')
-rw-r--r-- | drivers/pci/pci-mvebu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/pci-mvebu.c b/drivers/pci/pci-mvebu.c index da2459bafe..907bda0f96 100644 --- a/drivers/pci/pci-mvebu.c +++ b/drivers/pci/pci-mvebu.c @@ -306,7 +306,7 @@ static struct mvebu_pcie *mvebu_pcie_port_probe(struct device_d *dev, reset_gpio = of_get_named_gpio_flags(np, "reset-gpios", 0, &flags); if (gpio_is_valid(reset_gpio)) { int reset_active_low = flags & OF_GPIO_ACTIVE_LOW; - char *reset_name = asprintf("pcie%d.%d-reset", port, lane); + char *reset_name = basprintf("pcie%d.%d-reset", port, lane); u32 reset_udelay = 20000; of_property_read_u32(np, "reset-delay-us", &reset_udelay); @@ -326,7 +326,7 @@ static struct mvebu_pcie *mvebu_pcie_port_probe(struct device_d *dev, pcie->port = port; pcie->lane = lane; pcie->lane_mask = lane_mask; - pcie->name = asprintf("pcie%d.%d", port, lane); + pcie->name = basprintf("pcie%d.%d", port, lane); pcie->devfn = devfn; pcie->base = of_iomap(np, 0); |