From cba7316c2662ee1c916345b034ca08dad43984f7 Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Thu, 5 Oct 2017 17:32:43 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/21896 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/drivers/intel/fsp2_0/graphics.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/drivers/intel/fsp2_0/graphics.c') diff --git a/src/drivers/intel/fsp2_0/graphics.c b/src/drivers/intel/fsp2_0/graphics.c index 84f2d6dc21..e2ff7cf4f8 100644 --- a/src/drivers/intel/fsp2_0/graphics.c +++ b/src/drivers/intel/fsp2_0/graphics.c @@ -99,8 +99,7 @@ uintptr_t fsp_load_vbt(void) struct region_device rdev; void *vbt_data = NULL; - if (locate_vbt(&rdev) != CB_ERR) - vbt_data = rdev_mmap_full(&rdev); + vbt_data = locate_vbt(&rdev); if (vbt_data == NULL) printk(BIOS_NOTICE, "Could not locate a VBT file in CBFS\n"); -- cgit v1.2.3