diff options
author | Patrick Georgi <pgeorgi@google.com> | 2017-10-05 17:32:43 +0200 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2017-10-06 16:59:20 +0000 |
commit | cba7316c2662ee1c916345b034ca08dad43984f7 (patch) | |
tree | 3a41c6c78ff9d0d1a67328c2f8cd336dd80ea205 /src/soc/intel/common/opregion.c | |
parent | c1ef5c1752cc440f4436968e54f8dd79f638951e (diff) |
soc/intel/common: refactor locate_vbt
All callers of locate_vbt just care about the file content and
immediately map the rdev for its content.
Instead of repeating this in all call sites, move that code to
locate_vbt.
Change-Id: I5b518e6c959437bd8f393269db7955358a786719
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/21896
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/common/opregion.c')
-rw-r--r-- | src/soc/intel/common/opregion.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/soc/intel/common/opregion.c b/src/soc/intel/common/opregion.c index 6cb388ce82..1eb8609ada 100644 --- a/src/soc/intel/common/opregion.c +++ b/src/soc/intel/common/opregion.c @@ -27,12 +27,7 @@ enum cb_err init_igd_opregion(igd_opregion_t *opregion) optionrom_vbt_t *vbt; optionrom_vbt_t *ext_vbt; - if (locate_vbt(&vbt_rdev) == CB_ERR) { - printk(BIOS_ERR, "VBT not found\n"); - return CB_ERR; - }; - - vbt = rdev_mmap_full(&vbt_rdev); + vbt = locate_vbt(&vbt_rdev); if (!vbt) { printk(BIOS_ERR, "VBT couldn't be read\n"); |