mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 23:36:03 +09:00
efi_loader: replace printf by log in efi_uclass.c
Use logging functions instead of printf() and debug(). Change logging messages for uclass creation and destruction to log_debug(). Reported-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
a2c8324711
commit
fc364424ac
|
@ -238,7 +238,7 @@ static efi_status_t EFIAPI efi_uc_stop(
|
||||||
}
|
}
|
||||||
ret = EFI_CALL(systab.boottime->free_pool(entry_buffer));
|
ret = EFI_CALL(systab.boottime->free_pool(entry_buffer));
|
||||||
if (ret != EFI_SUCCESS)
|
if (ret != EFI_SUCCESS)
|
||||||
printf("%s: ERROR: Cannot free pool\n", __func__);
|
log_err("Cannot free EFI memory pool\n");
|
||||||
|
|
||||||
/* Detach driver from controller */
|
/* Detach driver from controller */
|
||||||
ret = EFI_CALL(systab.boottime->close_protocol(
|
ret = EFI_CALL(systab.boottime->close_protocol(
|
||||||
|
@ -260,10 +260,10 @@ static efi_status_t efi_add_driver(struct driver *drv)
|
||||||
const struct efi_driver_ops *ops = drv->ops;
|
const struct efi_driver_ops *ops = drv->ops;
|
||||||
struct efi_driver_binding_extended_protocol *bp;
|
struct efi_driver_binding_extended_protocol *bp;
|
||||||
|
|
||||||
debug("EFI: Adding driver '%s'\n", drv->name);
|
log_debug("Adding EFI driver '%s'\n", drv->name);
|
||||||
if (!ops->protocol) {
|
if (!ops->protocol) {
|
||||||
printf("EFI: ERROR: protocol GUID missing for driver '%s'\n",
|
log_err("EFI protocol GUID missing for driver '%s'\n",
|
||||||
drv->name);
|
drv->name);
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
bp = calloc(1, sizeof(struct efi_driver_binding_extended_protocol));
|
bp = calloc(1, sizeof(struct efi_driver_binding_extended_protocol));
|
||||||
|
@ -305,14 +305,14 @@ efi_status_t efi_driver_init(void)
|
||||||
struct driver *drv;
|
struct driver *drv;
|
||||||
efi_status_t ret = EFI_SUCCESS;
|
efi_status_t ret = EFI_SUCCESS;
|
||||||
|
|
||||||
debug("EFI: Initializing EFI driver framework\n");
|
log_debug("Initializing EFI driver framework\n");
|
||||||
for (drv = ll_entry_start(struct driver, driver);
|
for (drv = ll_entry_start(struct driver, driver);
|
||||||
drv < ll_entry_end(struct driver, driver); ++drv) {
|
drv < ll_entry_end(struct driver, driver); ++drv) {
|
||||||
if (drv->id == UCLASS_EFI) {
|
if (drv->id == UCLASS_EFI) {
|
||||||
ret = efi_add_driver(drv);
|
ret = efi_add_driver(drv);
|
||||||
if (ret != EFI_SUCCESS) {
|
if (ret != EFI_SUCCESS) {
|
||||||
printf("EFI: ERROR: failed to add driver %s\n",
|
log_err("Failed to add EFI driver %s\n",
|
||||||
drv->name);
|
drv->name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -328,7 +328,7 @@ efi_status_t efi_driver_init(void)
|
||||||
*/
|
*/
|
||||||
static int efi_uc_init(struct uclass *class)
|
static int efi_uc_init(struct uclass *class)
|
||||||
{
|
{
|
||||||
printf("EFI: Initializing UCLASS_EFI\n");
|
log_debug("Initializing UCLASS_EFI\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ static int efi_uc_init(struct uclass *class)
|
||||||
*/
|
*/
|
||||||
static int efi_uc_destroy(struct uclass *class)
|
static int efi_uc_destroy(struct uclass *class)
|
||||||
{
|
{
|
||||||
printf("Destroying UCLASS_EFI\n");
|
log_debug("Destroying UCLASS_EFI\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user