Commit-ID:  ac95090a0440be1b17aa1b5d9462d9c67146ce0b
Gitweb:     https://git.kernel.org/tip/ac95090a0440be1b17aa1b5d9462d9c67146ce0b
Author:     Andy Shevchenko <andriy.shevche...@linux.intel.com>
AuthorDate: Thu, 22 Feb 2018 14:59:23 +0200
Committer:  Ingo Molnar <mi...@kernel.org>
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 <andriy.shevche...@linux.intel.com>
Cc: Bjorn Helgaas <bhelg...@google.com>
Cc: Jean Delvare <jdelv...@suse.com>
Cc: Linus Torvalds <torva...@linux-foundation.org>
Cc: Peter Zijlstra <pet...@infradead.org>
Cc: Rafael J. Wysocki <r...@rjwysocki.net>
Cc: Thomas Gleixner <t...@linutronix.de>
Cc: linux-a...@vger.kernel.org
Cc: linux-...@vger.kernel.org
Link: 
http://lkml.kernel.org/r/20180222125923.57385-4-andriy.shevche...@linux.intel.com
Signed-off-by: Ingo Molnar <mi...@kernel.org>
---
 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;
        }
 

Reply via email to