Commit-ID: ac95090a0440be1b17aa1b5d9462d9c67146ce0b Gitweb: https://git.kernel.org/tip/ac95090a0440be1b17aa1b5d9462d9c67146ce0b Author: Andy Shevchenko <[email protected]> AuthorDate: Thu, 22 Feb 2018 14:59:23 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 23 Feb 2018 08:20:31 +0100
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 <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Jean Delvare <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]> --- drivers/pci/pci.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index f6a4dd10d9b0..ae654e21439d 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2258,8 +2258,6 @@ void pci_config_pm_runtime_put(struct pci_dev *pdev) */ bool pci_bridge_d3_possible(struct pci_dev *bridge) { - unsigned int year; - if (!pci_is_pcie(bridge)) return false; @@ -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 * to D3. */ - if (dmi_get_date(DMI_BIOS_DATE, &year, NULL, NULL) && - year >= 2015) { + if (dmi_get_bios_year() >= 2015) return true; - } break; }

