lkml.org 
[lkml]   [2013]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] EFI: use nr_tables param directly in efi_config_init
efi_config_init has the parameter nr_tables. Just use it instead of
dereference efi.systab->nr_tables.

Signed-off-by: Dave Young <dyoung@redhat.com>
---
arch/x86/platform/efi/efi.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

--- linux-2.6.orig/arch/x86/platform/efi/efi.c
+++ linux-2.6/arch/x86/platform/efi/efi.c
@@ -599,7 +599,7 @@ static int __init efi_config_init(u64 ta

tablep = config_tables;
pr_info("");
- for (i = 0; i < efi.systab->nr_tables; i++) {
+ for (i = 0; i < nr_tables; i++) {
efi_guid_t guid;
unsigned long table;

@@ -612,8 +612,7 @@ static int __init efi_config_init(u64 ta
if (table64 >> 32) {
pr_cont("\n");
pr_err("Table located above 4GB, disabling EFI.\n");
- early_iounmap(config_tables,
- efi.systab->nr_tables * sz);
+ early_iounmap(config_tables, nr_tables * sz);
return -EINVAL;
}
#endif
@@ -648,7 +647,7 @@ static int __init efi_config_init(u64 ta
tablep += sz;
}
pr_cont("\n");
- early_iounmap(config_tables, efi.systab->nr_tables * sz);
+ early_iounmap(config_tables, nr_tables * sz);
return 0;
}


\
 
 \ /
  Last update: 2013-09-12 11:21    [W:0.094 / U:1.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site