From 128741682250e196ccc9ff0bf9e7a5db5dfcdbd3 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sun, 12 Jan 2014 14:12:15 +0100 Subject: CBFS: use cbfs_get_file_content whenever possible rather than cbfs_get_file Number one reason to use cbfs_get_file was to get file length. With previous patch no more need for this. Change-Id: I330dda914d800c991757c5967b11963276ba9e00 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/4674 Reviewed-by: Patrick Georgi Tested-by: build bot (Jenkins) --- src/northbridge/intel/i82830/vga.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/northbridge') diff --git a/src/northbridge/intel/i82830/vga.c b/src/northbridge/intel/i82830/vga.c index 49bfa34965..40f23ccd94 100644 --- a/src/northbridge/intel/i82830/vga.c +++ b/src/northbridge/intel/i82830/vga.c @@ -32,21 +32,9 @@ static void vga_init(device_t dev) { printk(BIOS_INFO, "Starting Graphics Initialization\n"); - struct cbfs_file *file = cbfs_get_file(CBFS_DEFAULT_MEDIA, "mbi.bin"); - void *mbi = NULL; - unsigned int mbi_len = 0; - - if (file) { - if (ntohl(file->type) != CBFS_TYPE_MBI) { - printk(BIOS_INFO, "CBFS: MBI binary is of type %x instead of" - "type %x\n", file->type, CBFS_TYPE_MBI); - } else { - mbi = (void *) CBFS_SUBHEADER(file); - mbi_len = ntohl(file->len); - } - } else { - printk(BIOS_INFO, "Could not find MBI.\n"); - } + size_t mbi_len; + void *mbi = cbfs_get_file_content(CBFS_DEFAULT_MEDIA, "mbi.bin", + CBFS_TYPE_MBI, &mbi_len); if (mbi && mbi_len) { /* The GDT or coreboot table is going to live here. But -- cgit v1.2.3