summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/sysfb_efi.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2016-05-07 07:00:07 +0200
committerIngo Molnar <mingo@kernel.org>2016-05-07 07:00:07 +0200
commit35dc9ec1076b79c31bf7ed538af008b7f23bb14d (patch)
treef90affdd5dc45f47f8d5d84ea34c71e5e521e7a1 /arch/x86/kernel/sysfb_efi.c
parent0ec7ae928a9c19c2b7b8054507d5694a2597065e (diff)
parent07837831047fb72856d1f61a726a4094397facd8 (diff)
downloadlinux-35dc9ec1076b79c31bf7ed538af008b7f23bb14d.tar.bz2
Merge branch 'linus' into efi/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86/kernel/sysfb_efi.c')
-rw-r--r--arch/x86/kernel/sysfb_efi.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/x86/kernel/sysfb_efi.c b/arch/x86/kernel/sysfb_efi.c
index e21a8a7ddcff..623965e86b65 100644
--- a/arch/x86/kernel/sysfb_efi.c
+++ b/arch/x86/kernel/sysfb_efi.c
@@ -121,14 +121,24 @@ static int __init efifb_set_system(const struct dmi_system_id *id)
continue;
for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
resource_size_t start, end;
+ unsigned long flags;
+
+ flags = pci_resource_flags(dev, i);
+ if (!(flags & IORESOURCE_MEM))
+ continue;
+
+ if (flags & IORESOURCE_UNSET)
+ continue;
+
+ if (pci_resource_len(dev, i) == 0)
+ continue;
start = pci_resource_start(dev, i);
- if (start == 0)
- break;
end = pci_resource_end(dev, i);
if (screen_info.lfb_base >= start &&
screen_info.lfb_base < end) {
found_bar = 1;
+ break;
}
}
}