sprintf(name, "efiblk#%d", devnum);
/* Create driver model udevice for the EFI block io device */
- if (blk_create_device(parent, "efi_blk", name, UCLASS_EFI_LOADER,
- devnum, io->media->block_size,
- (lbaint_t)io->media->last_block, &bdev)) {
+ if (blk_create_devicef(parent, "efi_blk", name, UCLASS_EFI_LOADER,
+ devnum, io->media->block_size,
+ (lbaint_t)io->media->last_block, &bdev)) {
ret = EFI_OUT_OF_RESOURCES;
free(name);
goto err;
}
- /* Set the DM_FLAG_NAME_ALLOCED flag to avoid a memory leak */
- device_set_name_alloced(bdev);
plat = dev_get_plat(bdev);
plat->handle = handle;