From patchwork Fri Oct 27 22:23:41 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: 831525 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3yNzBV5pQVz9t2x for ; Sat, 28 Oct 2017 09:31:46 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932632AbdJ0Wat (ORCPT ); Fri, 27 Oct 2017 18:30:49 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:54227 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752652AbdJ0Wan (ORCPT ); Fri, 27 Oct 2017 18:30:43 -0400 Received: from chwl001.hbnet.cz (62.168.35.67) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.82) id 0b6cae5f5d1db7aa; Sat, 28 Oct 2017 00:30:41 +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 Subject: [PATCH v2 4/6] PCI / PM: Drop unnecessary invocations of pcibios_pm_ops callbacks Date: Sat, 28 Oct 2017 00:23:41 +0200 Message-ID: <5073211.tP4UlnrTEx@aspire.rjw.lan> In-Reply-To: <16592954.7Zo1mAdIIH@aspire.rjw.lan> References: <3806130.B2KCK0tvef@aspire.rjw.lan> <16592954.7Zo1mAdIIH@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 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 Acked-by: Greg Kroah-Hartman Acked-by: Bjorn Helgaas Reviewed-by: Ulf Hansson --- -> v2: No changes. --- 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 @@ -922,9 +922,6 @@ static int pci_pm_freeze(struct device * return error; } - if (pcibios_pm_ops.freeze) - return pcibios_pm_ops.freeze(dev); - return 0; } @@ -986,12 +983,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); @@ -1036,9 +1027,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; } @@ -1111,12 +1099,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.