From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Andy Shevchenko To: Bjorn Helgaas , linux-pci@vger.kernel.org, "Rafael J . Wysocki" , linux-acpi@vger.kernel.org, Thomas Gleixner , Ingo Molnar , "H . Peter Anvin" , x86@kernel.org, Jean Delvare Cc: Andy Shevchenko Subject: [PATCH v2 4/4] PCI: Simplify code by using the new dmi_get_bios_year() helper Date: Thu, 1 Mar 2018 20:02:20 +0200 Message-Id: <20180301180220.11333-5-andriy.shevchenko@linux.intel.com> In-Reply-To: <20180301180220.11333-1-andriy.shevchenko@linux.intel.com> References: <20180301180220.11333-1-andriy.shevchenko@linux.intel.com> Sender: linux-acpi-owner@vger.kernel.org List-ID: Use new dmi_get_bios_year() helper instead of open-coding its functionality. No changes in functionality. Reviewed-by: Jean Delvare Acked-by: Bjorn Helgaas Signed-off-by: Andy Shevchenko --- 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; } -- 2.16.1