summaryrefslogtreecommitdiffstats
path: root/drivers/nor/cfi_flash_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/nor/cfi_flash_new.c')
-rw-r--r--drivers/nor/cfi_flash_new.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/nor/cfi_flash_new.c b/drivers/nor/cfi_flash_new.c
index f45b97b839..e114bd2be6 100644
--- a/drivers/nor/cfi_flash_new.c
+++ b/drivers/nor/cfi_flash_new.c
@@ -948,7 +948,6 @@ static int cfi_probe (struct device_d *dev)
{
unsigned long size = 0;
flash_info_t *info = xzalloc(sizeof(flash_info_t));
- char name[MAX_DRIVER_NAME];
dev->priv = (void *)info;
@@ -969,8 +968,7 @@ static int cfi_probe (struct device_d *dev)
return -ENODEV;
}
- get_free_deviceid(name, "nor");
- info->cdev.name = strdup(name);
+ info->cdev.name = asprintf("nor%d", dev->id);
info->cdev.size = info->size;
info->cdev.dev = dev;
info->cdev.ops = &cfi_ops;