diff options
-rw-r--r-- | src/soc/intel/apollolake/graphics.c | 2 | ||||
-rw-r--r-- | src/soc/intel/common/opregion.c | 10 | ||||
-rw-r--r-- | src/soc/intel/common/opregion.h | 2 | ||||
-rw-r--r-- | src/soc/intel/skylake/opregion.c | 4 |
4 files changed, 9 insertions, 9 deletions
diff --git a/src/soc/intel/apollolake/graphics.c b/src/soc/intel/apollolake/graphics.c index 7123e4f16f..0893d7dab2 100644 --- a/src/soc/intel/apollolake/graphics.c +++ b/src/soc/intel/apollolake/graphics.c @@ -44,7 +44,7 @@ static unsigned long igd_write_opregion(device_t dev, unsigned long current, printk(BIOS_DEBUG, "ACPI: * IGD OpRegion\n"); opregion = (igd_opregion_t *)current; - if (!init_igd_opregion(opregion)) + if (init_igd_opregion(opregion) != CB_SUCCESS) return current; current += sizeof(igd_opregion_t); diff --git a/src/soc/intel/common/opregion.c b/src/soc/intel/common/opregion.c index 25c0a58c6f..6cb388ce82 100644 --- a/src/soc/intel/common/opregion.c +++ b/src/soc/intel/common/opregion.c @@ -21,7 +21,7 @@ #include "opregion.h" #include "vbt.h" -int init_igd_opregion(igd_opregion_t *opregion) +enum cb_err init_igd_opregion(igd_opregion_t *opregion) { struct region_device vbt_rdev; optionrom_vbt_t *vbt; @@ -29,14 +29,14 @@ int init_igd_opregion(igd_opregion_t *opregion) if (locate_vbt(&vbt_rdev) == CB_ERR) { printk(BIOS_ERR, "VBT not found\n"); - return 0; + return CB_ERR; }; vbt = rdev_mmap_full(&vbt_rdev); if (!vbt) { printk(BIOS_ERR, "VBT couldn't be read\n"); - return 0; + return CB_ERR; } memset(opregion, 0, sizeof(igd_opregion_t)); @@ -51,7 +51,7 @@ int init_igd_opregion(igd_opregion_t *opregion) if (ext_vbt == NULL) { printk(BIOS_ERR, "Unable to add Ext VBT to cbmem!\n"); - return 0; + return CB_ERR; } memcpy(ext_vbt, vbt, vbt->hdr_vbt_size); @@ -71,5 +71,5 @@ int init_igd_opregion(igd_opregion_t *opregion) rdev_munmap(&vbt_rdev, vbt); - return 1; + return CB_SUCCESS; } diff --git a/src/soc/intel/common/opregion.h b/src/soc/intel/common/opregion.h index bcffe6e5f6..7945a49ace 100644 --- a/src/soc/intel/common/opregion.h +++ b/src/soc/intel/common/opregion.h @@ -19,6 +19,6 @@ #include <drivers/intel/gma/opregion.h> /* Loads vbt and initializes opregion. Returns non-zero on success */ -int init_igd_opregion(igd_opregion_t *opregion); +enum cb_err init_igd_opregion(igd_opregion_t *opregion); #endif /* _COMMON_OPREGION_H_ */ diff --git a/src/soc/intel/skylake/opregion.c b/src/soc/intel/skylake/opregion.c index 4539560efd..ef7d4ab968 100644 --- a/src/soc/intel/skylake/opregion.c +++ b/src/soc/intel/skylake/opregion.c @@ -19,7 +19,7 @@ #include <stdlib.h> #include <string.h> -int init_igd_opregion(igd_opregion_t *opregion) +enum cb_err init_igd_opregion(igd_opregion_t *opregion) { const optionrom_vbt_t *vbt; uint32_t vbt_len; @@ -46,5 +46,5 @@ int init_igd_opregion(igd_opregion_t *opregion) /* We just assume we're mobile for now */ opregion->header.mailboxes = MAILBOXES_MOBILE; - return 0; + return CB_SUCCESS; } |