From patchwork Mon Oct 16 01:29:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 10007407 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AFE0B601E9 for ; Mon, 16 Oct 2017 01:45:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A17142654B for ; Mon, 16 Oct 2017 01:45:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 96479269B2; Mon, 16 Oct 2017 01:45:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 37C812654B for ; Mon, 16 Oct 2017 01:45:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751923AbdJPBpd (ORCPT ); Sun, 15 Oct 2017 21:45:33 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:41206 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751763AbdJPBnG (ORCPT ); Sun, 15 Oct 2017 21:43:06 -0400 Received: from 79.184.255.244.ipv4.supernova.orange.pl (79.184.255.244) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.82) id 2103c71074199c22; Mon, 16 Oct 2017 03:43:03 +0200 From: "Rafael J. Wysocki" To: Linux PM Cc: Bjorn Helgaas , Alan Stern , Greg Kroah-Hartman , LKML , Linux ACPI , Linux PCI , Linux Documentation , Mika Westerberg , Ulf Hansson , Andy Shevchenko , Kevin Hilman , Wolfram Sang , linux-i2c@vger.kernel.org, Lee Jones Subject: [PATCH 05/12] PCI / PM: Drop unnecessary invocations of pcibios_pm_ops callbacks Date: Mon, 16 Oct 2017 03:29:39 +0200 Message-ID: <2094189.3ZuY7TBjup@aspire.rjw.lan> In-Reply-To: <3806130.B2KCK0tvef@aspire.rjw.lan> References: <3806130.B2KCK0tvef@aspire.rjw.lan> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafael J. Wysocki The only user of non-empty pcibios_pm_ops is s390 and it only uses "noirq" callbacks, so drop the invocations of the other pcibios_pm_ops callbacks from the PCI PM code. That will allow subsequent changes to be somewhat simpler. Signed-off-by: Rafael J. Wysocki Reviewed-by: Ulf Hansson --- drivers/pci/pci-driver.c | 18 ------------------ 1 file changed, 18 deletions(-) Index: linux-pm/drivers/pci/pci-driver.c =================================================================== --- linux-pm.orig/drivers/pci/pci-driver.c +++ linux-pm/drivers/pci/pci-driver.c @@ -918,9 +918,6 @@ static int pci_pm_freeze(struct device * return error; } - if (pcibios_pm_ops.freeze) - return pcibios_pm_ops.freeze(dev); - return 0; } @@ -982,12 +979,6 @@ static int pci_pm_thaw(struct device *de const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; int error = 0; - if (pcibios_pm_ops.thaw) { - error = pcibios_pm_ops.thaw(dev); - if (error) - return error; - } - if (pci_has_legacy_pm_support(pci_dev)) return pci_legacy_resume(dev); @@ -1032,9 +1023,6 @@ static int pci_pm_poweroff(struct device Fixup: pci_fixup_device(pci_fixup_suspend, pci_dev); - if (pcibios_pm_ops.poweroff) - return pcibios_pm_ops.poweroff(dev); - return 0; } @@ -1107,12 +1095,6 @@ static int pci_pm_restore(struct device const struct dev_pm_ops *pm = dev->driver ? dev->driver->pm : NULL; int error = 0; - if (pcibios_pm_ops.restore) { - error = pcibios_pm_ops.restore(dev); - if (error) - return error; - } - /* * This is necessary for the hibernation error path in which restore is * called without restoring the standard config registers of the device.