[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-ac95090a0440be1b17aa1b5d9462d9c67146ce0b@git.kernel.org>
Date: Fri, 23 Feb 2018 00:26:05 -0800
From: tip-bot for Andy Shevchenko <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: mingo@...nel.org, tglx@...utronix.de, jdelvare@...e.com,
bhelgaas@...gle.com, linux-kernel@...r.kernel.org,
andriy.shevchenko@...ux.intel.com, torvalds@...ux-foundation.org,
peterz@...radead.org, hpa@...or.com, rjw@...ysocki.net
Subject: [tip:x86/platform] pci: Simplify code by using the new
dmi_get_bios_year() helper
Commit-ID: ac95090a0440be1b17aa1b5d9462d9c67146ce0b
Gitweb: https://git.kernel.org/tip/ac95090a0440be1b17aa1b5d9462d9c67146ce0b
Author: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
AuthorDate: Thu, 22 Feb 2018 14:59:23 +0200
Committer: Ingo Molnar <mingo@...nel.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.shevchenko@...ux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Jean Delvare <jdelvare@...e.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Rafael J. Wysocki <rjw@...ysocki.net>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: linux-acpi@...r.kernel.org
Cc: linux-pci@...r.kernel.org
Link: http://lkml.kernel.org/r/20180222125923.57385-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@...nel.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;
}
Powered by blists - more mailing lists