From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from acsinet15.oracle.com ([141.146.126.227]:29411 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161366Ab2CSFry (ORCPT ); Mon, 19 Mar 2012 01:47:54 -0400 From: Yinghai Lu To: Jesse Barnes , x86 Cc: Bjorn Helgaas , Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Yinghai Lu Subject: [PATCH -v3 21/47] PCI: Move pci_stop_and_remove_behind_bridge() down Date: Sun, 18 Mar 2012 22:46:10 -0700 Message-Id: <1332135996-13860-22-git-send-email-yinghai@kernel.org> In-Reply-To: <1332135996-13860-1-git-send-email-yinghai@kernel.org> References: <1332135996-13860-1-git-send-email-yinghai@kernel.org> Sender: linux-pci-owner@vger.kernel.org List-ID: Later it will use pci_stop_bus_devices instead of pci_stop_behind_bridge. Signed-off-by: Yinghai Lu --- drivers/pci/remove.c | 30 +++++++++++++++--------------- 1 files changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c index bf4b46b..3f540ce 100644 --- a/drivers/pci/remove.c +++ b/drivers/pci/remove.c @@ -128,21 +128,6 @@ static void pci_stop_behind_bridge(struct pci_dev *dev) pci_stop_bus_device(pci_dev_b(l)); } -/** - * pci_stop_and_remove_behind_bridge - stop and remove all devices behind - * a PCI bridge - * @dev: PCI bridge device - * - * Remove all devices on the bus, except for the parent bridge. - * This also removes any child buses, and any devices they may - * contain in a depth-first manner. - */ -void pci_stop_and_remove_behind_bridge(struct pci_dev *dev) -{ - pci_stop_behind_bridge(dev); - __pci_remove_behind_bridge(dev); -} - static void pci_stop_bus_devices(struct pci_bus *bus) { struct list_head *l, *n; @@ -162,6 +147,21 @@ static void pci_stop_bus_devices(struct pci_bus *bus) } /** + * pci_stop_and_remove_behind_bridge - stop and remove all devices behind + * a PCI bridge + * @dev: PCI bridge device + * + * Remove all devices on the bus, except for the parent bridge. + * This also removes any child buses, and any devices they may + * contain in a depth-first manner. + */ +void pci_stop_and_remove_behind_bridge(struct pci_dev *dev) +{ + pci_stop_behind_bridge(dev); + __pci_remove_behind_bridge(dev); +} + +/** * pci_stop_bus_device - stop a PCI device and any children * @dev: the device to stop * -- 1.7.7