diff options
author | Patrick Rudolph <siro@das-labor.org> | 2017-06-15 08:43:11 +0200 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-06-27 17:18:03 +0000 |
commit | a26dbbd9d066d4276b2d090654c73f7c589b3114 (patch) | |
tree | 4c85c186a3dc41d63f2b2674534eccf5ef65f697 /src/soc/intel/common/opregion.c | |
parent | 33232604a71cfb84ef21ff2adc14f4554d1bedb4 (diff) | |
download | coreboot-a26dbbd9d066d4276b2d090654c73f7c589b3114.tar.xz |
soc/intel/common/opregion: Use enum cb_err as return value
Return CB_SUCCESS and CB_ERR instead of some integer.
Preparation to merge intel/soc and intel/nb opregion implementations.
Change-Id: Ib99fcfe347b98736979fc82ab3de48bfc6fc7dcd
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20220
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/soc/intel/common/opregion.c')
-rw-r--r-- | src/soc/intel/common/opregion.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; } |