summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/disk_ata_drive.c2
-rw-r--r--drivers/ata/disk_bios_drive.c2
-rw-r--r--drivers/eeprom/at24.c2
-rw-r--r--drivers/mci/mci-core.c6
-rw-r--r--drivers/mfd/stmpe-i2c.c4
-rw-r--r--drivers/misc/sram.c3
-rw-r--r--drivers/mtd/core.c12
-rw-r--r--drivers/mtd/devices/docg3.c4
-rw-r--r--drivers/mtd/mtdoob.c2
-rw-r--r--drivers/mtd/mtdraw.c2
-rw-r--r--drivers/mtd/nand/nand-bb.c2
-rw-r--r--drivers/mtd/ubi/barebox.c4
-rw-r--r--drivers/net/ksz8864rmn.c2
-rw-r--r--drivers/of/barebox.c2
-rw-r--r--drivers/of/base.c3
-rw-r--r--drivers/of/of_path.c2
-rw-r--r--drivers/of/partition.c2
-rw-r--r--drivers/pci/pci-mvebu.c4
-rw-r--r--drivers/pinctrl/pinctrl.c2
-rw-r--r--drivers/pwm/pwm-imx.c5
-rw-r--r--drivers/pwm/pwm-mxs.c2
-rw-r--r--drivers/pwm/pxa_pwm.c2
-rw-r--r--drivers/regulator/core.c2
-rw-r--r--drivers/spi/gpio_spi.c2
-rw-r--r--drivers/usb/gadget/composite.c2
-rw-r--r--drivers/usb/gadget/f_fastboot.c7
-rw-r--r--drivers/usb/storage/usb.c2
-rw-r--r--drivers/video/edid.c9
-rw-r--r--drivers/video/fb.c2
-rw-r--r--drivers/video/imx-ipu-v3/imx-ldb.c8
-rw-r--r--drivers/video/imx-ipu-v3/ipu-di.c3
-rw-r--r--drivers/video/imx-ipu-v3/ipufb.c2
-rw-r--r--drivers/w1/slaves/w1_ds2431.c2
-rw-r--r--drivers/w1/slaves/w1_ds2433.c2
34 files changed, 60 insertions, 54 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);
diff --git a/drivers/eeprom/at24.c b/drivers/eeprom/at24.c
index 3c0a7a9d47..a323d25dd4 100644
--- a/drivers/eeprom/at24.c
+++ b/drivers/eeprom/at24.c
@@ -429,7 +429,7 @@ static int at24_probe(struct device_d *dev)
at24->chip = chip;
at24->num_addresses = num_addresses;
- at24->cdev.name = asprintf("eeprom%d", dev->id);
+ at24->cdev.name = basprintf("eeprom%d", dev->id);
at24->cdev.priv = at24;
at24->cdev.dev = dev;
at24->cdev.ops = &at24->fops;
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);
diff --git a/drivers/mfd/stmpe-i2c.c b/drivers/mfd/stmpe-i2c.c
index c1e7d9ece4..fb91ffa008 100644
--- a/drivers/mfd/stmpe-i2c.c
+++ b/drivers/mfd/stmpe-i2c.c
@@ -141,8 +141,8 @@ static int stmpe_probe(struct device_d *dev)
}
stmpe_dev = xzalloc(sizeof(struct stmpe));
- stmpe_dev->cdev.name = asprintf(DRIVERNAME "%d",
- cdev_find_free_index(DRIVERNAME));
+ stmpe_dev->cdev.name = basprintf(DRIVERNAME"%d",
+ cdev_find_free_index(DRIVERNAME));
stmpe_dev->client = to_i2c_client(dev);
stmpe_dev->cdev.size = 191; /* 191 known registers */
stmpe_dev->cdev.dev = dev;
diff --git a/drivers/misc/sram.c b/drivers/misc/sram.c
index 58b574157a..4fb6f801d2 100644
--- a/drivers/misc/sram.c
+++ b/drivers/misc/sram.c
@@ -47,8 +47,7 @@ static int sram_probe(struct device_d *dev)
sram = xzalloc(sizeof(*sram));
- sram->cdev.name = asprintf("sram%d",
- cdev_find_free_index("sram"));
+ sram->cdev.name = basprintf("sram%d", cdev_find_free_index("sram"));
res = dev_get_resource(dev, IORESOURCE_MEM, 0);
if (IS_ERR(res))
diff --git a/drivers/mtd/core.c b/drivers/mtd/core.c
index dcf94bfc0d..6d04b88553 100644
--- a/drivers/mtd/core.c
+++ b/drivers/mtd/core.c
@@ -470,10 +470,10 @@ static int mtd_partition_set(struct device_d *dev, struct param_d *p, const char
static char *print_size(uint64_t s)
{
if (!(s & ((1 << 20) - 1)))
- return asprintf("%lldM", s >> 20);
+ return basprintf("%lldM", s >> 20);
if (!(s & ((1 << 10) - 1)))
- return asprintf("%lldk", s >> 10);
- return asprintf("0x%lld", s);
+ return basprintf("%lldk", s >> 10);
+ return basprintf("0x%lld", s);
}
static int print_part(char *buf, int bufsize, struct mtd_info *mtd, uint64_t last_ofs,
@@ -577,7 +577,8 @@ static int of_mtd_fixup(struct device_node *root, void *ctx)
list_for_each_entry(partmtd, &mtd->partitions, partitions_entry) {
int na, ns, len = 0;
- char *name = asprintf("partition@%0llx", partmtd->master_offset);
+ char *name = basprintf("partition@%0llx",
+ partmtd->master_offset);
void *p;
u8 tmp[16 * 16]; /* Up to 64-bit address + 64-bit size */
@@ -675,7 +676,8 @@ int add_mtd_device(struct mtd_info *mtd, const char *devname, int device_id)
if (device_id == DEVICE_ID_SINGLE)
mtd->cdev.name = xstrdup(devname);
else
- mtd->cdev.name = asprintf("%s%d", devname, mtd->class_dev.id);
+ mtd->cdev.name = basprintf("%s%d", devname,
+ mtd->class_dev.id);
INIT_LIST_HEAD(&mtd->partitions);
diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c
index 6a9bc74847..a40ba25632 100644
--- a/drivers/mtd/devices/docg3.c
+++ b/drivers/mtd/devices/docg3.c
@@ -1058,8 +1058,8 @@ static void __init doc_set_driver_info(int chip_id, struct mtd_info *mtd)
switch (chip_id) {
case DOC_CHIPID_G3:
- mtd->name = asprintf("DiskOnChip G3 floor %d",
- docg3->device_id);
+ mtd->name = basprintf("DiskOnChip G3 floor %d",
+ docg3->device_id);
docg3->max_block = 2047;
break;
}
diff --git a/drivers/mtd/mtdoob.c b/drivers/mtd/mtdoob.c
index 4dcf2f5915..86076f028d 100644
--- a/drivers/mtd/mtdoob.c
+++ b/drivers/mtd/mtdoob.c
@@ -79,7 +79,7 @@ static int add_mtdoob_device(struct mtd_info *mtd, const char *devname, void **p
mtdoob = xzalloc(sizeof(*mtdoob));
mtdoob->cdev.ops = &mtd_ops_oob;
mtdoob->cdev.size = mtd_div_by_wb(mtd->size, mtd) * mtd->oobsize;
- mtdoob->cdev.name = asprintf("%s.oob", mtd->cdev.name);
+ mtdoob->cdev.name = basprintf("%s.oob", mtd->cdev.name);
mtdoob->cdev.priv = mtdoob;
mtdoob->cdev.dev = &mtd->class_dev;
mtdoob->mtd = mtd;
diff --git a/drivers/mtd/mtdraw.c b/drivers/mtd/mtdraw.c
index 4d6ac72bd9..b06eb18f3f 100644
--- a/drivers/mtd/mtdraw.c
+++ b/drivers/mtd/mtdraw.c
@@ -308,7 +308,7 @@ static int add_mtdraw_device(struct mtd_info *mtd, const char *devname, void **p
mtdraw->cdev.ops = (struct file_operations *)&mtd_raw_fops;
mtdraw->cdev.size = mtd_div_by_wb(mtd->size, mtd) *
(mtd->writesize + mtd->oobsize);
- mtdraw->cdev.name = asprintf("%s.raw", mtd->cdev.name);
+ mtdraw->cdev.name = basprintf("%s.raw", mtd->cdev.name);
mtdraw->cdev.priv = mtdraw;
mtdraw->cdev.dev = &mtd->class_dev;
mtdraw->cdev.mtd = mtd;
diff --git a/drivers/mtd/nand/nand-bb.c b/drivers/mtd/nand/nand-bb.c
index e6d42772b3..015f8dc524 100644
--- a/drivers/mtd/nand/nand-bb.c
+++ b/drivers/mtd/nand/nand-bb.c
@@ -288,7 +288,7 @@ struct cdev *mtd_add_bb(struct mtd_info *mtd, const char *name)
if (name)
bb->cdev.name = xstrdup(name);
else
- bb->cdev.name = asprintf("%s.bb", mtd->cdev.name);
+ bb->cdev.name = basprintf("%s.bb", mtd->cdev.name);
nand_bb_calc_size(bb);
bb->cdev.ops = &nand_bb_ops;
diff --git a/drivers/mtd/ubi/barebox.c b/drivers/mtd/ubi/barebox.c
index c26a2455b2..ad38e69ea5 100644
--- a/drivers/mtd/ubi/barebox.c
+++ b/drivers/mtd/ubi/barebox.c
@@ -176,7 +176,7 @@ int ubi_volume_cdev_add(struct ubi_device *ubi, struct ubi_volume *vol)
priv->ubi = ubi;
cdev->ops = &ubi_volume_fops;
- cdev->name = asprintf("%s.%s", ubi->cdev.name, vol->name);
+ cdev->name = basprintf("%s.%s", ubi->cdev.name, vol->name);
cdev->priv = priv;
cdev->size = vol->used_bytes;
cdev->dev = &vol->dev;
@@ -239,7 +239,7 @@ int ubi_cdev_add(struct ubi_device *ubi)
int ret;
cdev->ops = &ubi_fops;
- cdev->name = asprintf("%s.ubi", ubi->mtd->cdev.name);
+ cdev->name = basprintf("%s.ubi", ubi->mtd->cdev.name);
cdev->priv = ubi;
cdev->size = 0;
diff --git a/drivers/net/ksz8864rmn.c b/drivers/net/ksz8864rmn.c
index 3ca85fb3f3..860af448ea 100644
--- a/drivers/net/ksz8864rmn.c
+++ b/drivers/net/ksz8864rmn.c
@@ -149,7 +149,7 @@ static int micrel_switch_probe(struct device_d *dev)
return -ENODEV;
}
- priv->cdev.name = asprintf("switch%d", dev->id);
+ priv->cdev.name = basprintf("switch%d", dev->id);
priv->cdev.size = 256;
priv->cdev.ops = &micrel_switch_ops;
priv->cdev.priv = priv;
diff --git a/drivers/of/barebox.c b/drivers/of/barebox.c
index 125feef2cc..64f483326d 100644
--- a/drivers/of/barebox.c
+++ b/drivers/of/barebox.c
@@ -61,7 +61,7 @@ static int environment_check_mount(struct device_d *dev, char **devpath)
/* Set env to be in a file on the now mounted device */
dev_dbg(dev, "Loading default env from %s on device %s\n",
filepath, *devpath);
- *devpath = asprintf("%s/%s", ENV_MNT_DIR, filepath);
+ *devpath = basprintf("%s/%s", ENV_MNT_DIR, filepath);
return 0;
}
diff --git a/drivers/of/base.c b/drivers/of/base.c
index d12bfe328a..b4ef8e362f 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -1702,7 +1702,8 @@ struct device_node *of_new_node(struct device_node *parent, const char *name)
if (parent) {
node->name = xstrdup(name);
- node->full_name = asprintf("%s/%s", node->parent->full_name, name);
+ node->full_name = basprintf("%s/%s",
+ node->parent->full_name, name);
list_add(&node->list, &parent->list);
} else {
node->name = xstrdup("");
diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c
index ed620f1755..8e1931f939 100644
--- a/drivers/of/of_path.c
+++ b/drivers/of/of_path.c
@@ -75,7 +75,7 @@ static int __of_find_path(struct device_node *node, const char *part, char **out
mtd_can_have_bb(cdev->mtd))
add_bb = true;
- *outpath = asprintf("/dev/%s%s", cdev->name, add_bb ? ".bb" : "");
+ *outpath = basprintf("/dev/%s%s", cdev->name, add_bb ? ".bb" : "");
return 0;
}
diff --git a/drivers/of/partition.c b/drivers/of/partition.c
index 6017897b02..b6621f7dad 100644
--- a/drivers/of/partition.c
+++ b/drivers/of/partition.c
@@ -58,7 +58,7 @@ struct cdev *of_parse_partition(struct cdev *cdev, struct device_node *node)
if (of_get_property(node, "read-only", &len))
flags = DEVFS_PARTITION_READONLY;
- filename = asprintf("%s.%s", cdev->name, partname);
+ filename = basprintf("%s.%s", cdev->name, partname);
new = devfs_add_partition(cdev->name, offset, size, flags, filename);
if (IS_ERR(new))
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);
diff --git a/drivers/pinctrl/pinctrl.c b/drivers/pinctrl/pinctrl.c
index 10ce186a12..e7b08a2bfe 100644
--- a/drivers/pinctrl/pinctrl.c
+++ b/drivers/pinctrl/pinctrl.c
@@ -68,7 +68,7 @@ int of_pinctrl_select_state(struct device_node *np, const char *name)
/* For each defined state ID */
for (state = 0; ; state++) {
/* Retrieve the pinctrl-* property */
- propname = asprintf("pinctrl-%d", state);
+ propname = basprintf("pinctrl-%d", state);
prop = of_find_property(np, propname, NULL);
free(propname);
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 0845c234fe..b620e502f2 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -236,9 +236,10 @@ static int imx_pwm_probe(struct device_d *dev)
if (dev->device_node) {
imx->chip.devname = of_alias_get(dev->device_node);
if (!imx->chip.devname)
- imx->chip.devname = asprintf("pwm_%p", imx->mmio_base);
+ imx->chip.devname = basprintf("pwm_%p",
+ imx->mmio_base);
} else {
- imx->chip.devname = asprintf("pwm%d", dev->id);
+ imx->chip.devname = basprintf("pwm%d", dev->id);
}
imx->config = data->config;
diff --git a/drivers/pwm/pwm-mxs.c b/drivers/pwm/pwm-mxs.c
index 011d9002ba..e72f1dbcb0 100644
--- a/drivers/pwm/pwm-mxs.c
+++ b/drivers/pwm/pwm-mxs.c
@@ -143,7 +143,7 @@ static int mxs_pwm_probe(struct device_d *dev)
struct mxs_pwm_chip *mxspwm = &mxs->pwm[i];
mxspwm->chip.ops = &mxs_pwm_ops;
- mxspwm->chip.devname = asprintf("pwm%d", i);
+ mxspwm->chip.devname = basprintf("pwm%d", i);
mxspwm->chip.id = i;
mxspwm->mxs = mxs;
diff --git a/drivers/pwm/pxa_pwm.c b/drivers/pwm/pxa_pwm.c
index e399d03efd..c7130c225e 100644
--- a/drivers/pwm/pxa_pwm.c
+++ b/drivers/pwm/pxa_pwm.c
@@ -134,7 +134,7 @@ static int pxa_pwm_probe(struct device_d *dev)
struct pxa_pwm_chip *chip;
chip = xzalloc(sizeof(*chip));
- chip->chip.devname = asprintf("pwm%d", dev->id);
+ chip->chip.devname = basprintf("pwm%d", dev->id);
chip->chip.ops = &pxa_pwm_ops;
iores = dev_request_mem_resource(dev, 0);
if (IS_ERR(iores))
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 73f5c6eb4b..39df980dcb 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -153,7 +153,7 @@ static struct regulator_internal *of_regulator_get(struct device_d *dev, const c
struct regulator_internal *ri;
struct device_node *node;
- propname = asprintf("%s-supply", supply);
+ propname = basprintf("%s-supply", supply);
/*
* If the device does have a device node return the dummy regulator.
diff --git a/drivers/spi/gpio_spi.c b/drivers/spi/gpio_spi.c
index 4ea545a282..e37db756f8 100644
--- a/drivers/spi/gpio_spi.c
+++ b/drivers/spi/gpio_spi.c
@@ -209,7 +209,7 @@ static int gpio_spi_probe(struct device_d *dev)
if (!gpio_is_valid(pdata->cs[n]))
continue;
- cs_name = asprintf("spi-cs%d", n);
+ cs_name = basprintf("spi-cs%d", n);
ret = gpio_request_one(pdata->cs[n], GPIOF_DIR_OUT, cs_name);
if (ret)
return ret;
diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c
index ba3b9da206..9e38ac4942 100644
--- a/drivers/usb/gadget/composite.c
+++ b/drivers/usb/gadget/composite.c
@@ -1763,7 +1763,7 @@ EXPORT_SYMBOL_GPL(usb_composite_setup_continue);
static char *composite_default_mfr(struct usb_gadget *gadget)
{
- return asprintf("barebox %s", gadget->name);
+ return basprintf("barebox %s", gadget->name);
}
void usb_composite_overwrite_options(struct usb_composite_dev *cdev,
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/f_fastboot.c
index 9a8cd4c844..fdea52eb93 100644
--- a/drivers/usb/gadget/f_fastboot.c
+++ b/drivers/usb/gadget/f_fastboot.c
@@ -195,7 +195,7 @@ static void fb_setvar(struct fb_variable *var, const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
- var->value = vasprintf(fmt, ap);
+ var->value = bvasprintf(fmt, ap);
va_end(ap);
}
@@ -205,7 +205,7 @@ static struct fb_variable *fb_addvar(struct f_fastboot *f_fb, const char *fmt, .
va_list ap;
va_start(ap, fmt);
- var->name = vasprintf(fmt, ap);
+ var->name = bvasprintf(fmt, ap);
va_end(ap);
list_add_tail(&var->list, &f_fb->variables);
@@ -702,7 +702,8 @@ static void cb_flash(struct usb_ep *ep, struct usb_request *req, const char *cmd
if (ret)
goto copy;
- cmd = asprintf("ubiformat -y -f %s %s", FASTBOOT_TMPFILE, filename);
+ cmd = basprintf("ubiformat -y -f %s %s", FASTBOOT_TMPFILE,
+ filename);
fastboot_tx_print(f_fb, "INFOThis is an UBI image...");
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 9d1ffa3070..8218bb2a71 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -397,7 +397,7 @@ static int usb_stor_add_blkdev(struct us_data *us, struct device_d *dev,
pr_err("Cannot find a free number for the disk node\n");
pr_info("Using index %d for the new disk\n", result);
- pblk_dev->blk.cdev.name = asprintf("disk%d", result);
+ pblk_dev->blk.cdev.name = basprintf("disk%d", result);
pblk_dev->blk.blockbits = SECTOR_SHIFT;
result = blockdevice_register(&pblk_dev->blk);
diff --git a/drivers/video/edid.c b/drivers/video/edid.c
index 828c3610ac..e5c32a0c1b 100644
--- a/drivers/video/edid.c
+++ b/drivers/video/edid.c
@@ -469,7 +469,8 @@ static void calc_mode_timings(int xres, int yres, int refresh,
mode->yres = yres;
mode->refresh = refresh;
fb_get_mode(0, refresh, mode);
- mode->name = asprintf("%dx%d@%d-calc", mode->xres, mode->yres, mode->refresh);
+ mode->name = basprintf("%dx%d@%d-calc", mode->xres, mode->yres,
+ mode->refresh);
pr_debug(" %s\n", mode->name);
}
@@ -602,7 +603,8 @@ const struct fb_videomode vesa_modes[] = {
static void add_vesa_mode(struct fb_videomode *mode, int num)
{
*mode = vesa_modes[num];
- mode->name = asprintf("%dx%d@%d-vesa", mode->xres, mode->yres, mode->refresh);
+ mode->name = basprintf("%dx%d@%d-vesa", mode->xres, mode->yres,
+ mode->refresh);
pr_debug(" %s\n", mode->name);
}
@@ -748,7 +750,8 @@ static void get_detailed_timing(unsigned char *block,
pr_debug("%sHSync %sVSync\n", (HSYNC_POSITIVE) ? "+" : "-",
(VSYNC_POSITIVE) ? "+" : "-");
- mode->name = asprintf("%dx%d@%d", mode->xres, mode->yres, mode->refresh);
+ mode->name = basprintf("%dx%d@%d", mode->xres, mode->yres,
+ mode->refresh);
}
/**
diff --git a/drivers/video/fb.c b/drivers/video/fb.c
index 09bba001fb..4d2d3aa650 100644
--- a/drivers/video/fb.c
+++ b/drivers/video/fb.c
@@ -262,7 +262,7 @@ int register_framebuffer(struct fb_info *info)
info->line_length = info->xres * (info->bits_per_pixel >> 3);
info->cdev.ops = &fb_ops;
- info->cdev.name = asprintf("fb%d", id);
+ info->cdev.name = basprintf("fb%d", id);
info->cdev.size = info->line_length * info->yres;
info->cdev.dev = dev;
info->cdev.priv = info;
diff --git a/drivers/video/imx-ipu-v3/imx-ldb.c b/drivers/video/imx-ipu-v3/imx-ldb.c
index 2340b9b1d6..17ae894bf7 100644
--- a/drivers/video/imx-ipu-v3/imx-ldb.c
+++ b/drivers/video/imx-ipu-v3/imx-ldb.c
@@ -161,7 +161,7 @@ static int imx6q_ldb_prepare(struct imx_ldb_channel *imx_ldb_ch, int di,
ipuno = ((di >> 1) & 1) + 1;
dino = di & 0x1;
- clkname = asprintf("ipu%d_di%d_sel", ipuno, dino);
+ clkname = basprintf("ipu%d_di%d_sel", ipuno, dino);
diclk = clk_lookup(clkname);
free(clkname);
if (IS_ERR(diclk)) {
@@ -169,7 +169,7 @@ static int imx6q_ldb_prepare(struct imx_ldb_channel *imx_ldb_ch, int di,
return PTR_ERR(diclk);
}
- clkname = asprintf("ldb_di%d_podf", imx_ldb_ch->chno);
+ clkname = basprintf("ldb_di%d_podf", imx_ldb_ch->chno);
ldbclk = clk_lookup(clkname);
free(clkname);
if (IS_ERR(ldbclk)) {
@@ -208,7 +208,7 @@ static int imx53_ldb_prepare(struct imx_ldb_channel *imx_ldb_ch, int di,
dino = di & 0x1;
- clkname = asprintf("ipu_di%d_sel", dino);
+ clkname = basprintf("ipu_di%d_sel", dino);
diclk = clk_lookup(clkname);
free(clkname);
if (IS_ERR(diclk)) {
@@ -216,7 +216,7 @@ static int imx53_ldb_prepare(struct imx_ldb_channel *imx_ldb_ch, int di,
return PTR_ERR(diclk);
}
- clkname = asprintf("ldb_di%d_div", imx_ldb_ch->chno);
+ clkname = basprintf("ldb_di%d_div", imx_ldb_ch->chno);
ldbclk = clk_lookup(clkname);
free(clkname);
if (IS_ERR(ldbclk)) {
diff --git a/drivers/video/imx-ipu-v3/ipu-di.c b/drivers/video/imx-ipu-v3/ipu-di.c
index 8df9c9f06b..b6e64fe16a 100644
--- a/drivers/video/imx-ipu-v3/ipu-di.c
+++ b/drivers/video/imx-ipu-v3/ipu-di.c
@@ -732,8 +732,7 @@ int ipu_di_init(struct ipu_soc *ipu, struct device_d *dev, int id,
ipu_di_write(di, 0x10, DI_BS_CLKGEN0);
di->clk_di_pixel.parent_names = di->di_parent_names;
- di->clk_name = asprintf("%s_di%d_pixel",
- dev_name(dev), id);
+ di->clk_name = basprintf("%s_di%d_pixel", dev_name(dev), id);
if (!di->clk_name)
return -ENOMEM;
diff --git a/drivers/video/imx-ipu-v3/ipufb.c b/drivers/video/imx-ipu-v3/ipufb.c
index 747e094789..67fec11d4a 100644
--- a/drivers/video/imx-ipu-v3/ipufb.c
+++ b/drivers/video/imx-ipu-v3/ipufb.c
@@ -284,7 +284,7 @@ static int ipufb_probe(struct device_d *dev)
info = &fbi->info;
ipuid = of_alias_get_id(dev->parent->device_node, "ipu");
- fbi->name = asprintf("ipu%d-di%d", ipuid + 1, pdata->di);
+ fbi->name = basprintf("ipu%d-di%d", ipuid + 1, pdata->di);
fbi->id = ipuid * 2 + pdata->di;
fbi->dino = pdata->di;
diff --git a/drivers/w1/slaves/w1_ds2431.c b/drivers/w1/slaves/w1_ds2431.c
index 30e6e1d496..e3e929670d 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 a840d9a2f2..a907c6bf3c 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;