Commit ac95090a authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Ingo Molnar

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: default avatarAndy 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-4-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 9c0a30b6
...@@ -2258,8 +2258,6 @@ void pci_config_pm_runtime_put(struct pci_dev *pdev) ...@@ -2258,8 +2258,6 @@ void pci_config_pm_runtime_put(struct pci_dev *pdev)
*/ */
bool pci_bridge_d3_possible(struct pci_dev *bridge) bool pci_bridge_d3_possible(struct pci_dev *bridge)
{ {
unsigned int year;
if (!pci_is_pcie(bridge)) if (!pci_is_pcie(bridge))
return false; return false;
...@@ -2287,10 +2285,8 @@ bool pci_bridge_d3_possible(struct pci_dev *bridge) ...@@ -2287,10 +2285,8 @@ bool pci_bridge_d3_possible(struct pci_dev *bridge)
* It should be safe to put PCIe ports from 2015 or newer * It should be safe to put PCIe ports from 2015 or newer
* to D3. * to D3.
*/ */
if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && if (dmi_get_bios_year() >= 2015)
year >= 2015) {
return true; return true;
}
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment