x86/pci: Simplify code by using the new dmi_get_bios_year() helper
...instead of open coding its functionality. No changes in functionality. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Bjorn Helgaas <bhelgaas@google.com> Cc: Jean Delvare <jdelvare@suse.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rafael J. Wysocki <rjw@rjwysocki.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-acpi@vger.kernel.org Cc: linux-pci@vger.kernel.org Link: http://lkml.kernel.org/r/20180222125923.57385-2-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:

committed by
Ingo Molnar

parent
492a1abd61
commit
69c42d493d
@@ -195,14 +195,13 @@ static const struct pci_raw_ops pci_direct_conf2 = {
|
||||
static int __init pci_sanity_check(const struct pci_raw_ops *o)
|
||||
{
|
||||
u32 x = 0;
|
||||
int year, devfn;
|
||||
int devfn;
|
||||
|
||||
if (pci_probe & PCI_NO_CHECKS)
|
||||
return 1;
|
||||
/* Assume Type 1 works for newer systems.
|
||||
This handles machines that don't have anything on PCI Bus 0. */
|
||||
dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL);
|
||||
if (year >= 2001)
|
||||
if (dmi_get_bios_year() >= 2001)
|
||||
return 1;
|
||||
|
||||
for (devfn = 0; devfn < 0x100; devfn++) {
|
||||
|
Reference in New Issue
Block a user