From patchwork Mon Feb 29 12:56:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mika Westerberg X-Patchwork-Id: 8453321 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 96E879F38C for ; Mon, 29 Feb 2016 12:56:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C1BEC20295 for ; Mon, 29 Feb 2016 12:56:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DE8A3202E5 for ; Mon, 29 Feb 2016 12:56:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751173AbcB2M4O (ORCPT ); Mon, 29 Feb 2016 07:56:14 -0500 Received: from mga01.intel.com ([192.55.52.88]:2629 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750957AbcB2M4L (ORCPT ); Mon, 29 Feb 2016 07:56:11 -0500 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 29 Feb 2016 04:56:10 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,520,1449561600"; d="scan'208";a="923384709" Received: from black.fi.intel.com ([10.237.72.93]) by orsmga002.jf.intel.com with ESMTP; 29 Feb 2016 04:56:07 -0800 Received: by black.fi.intel.com (Postfix, from userid 1001) id 0621014D; Mon, 29 Feb 2016 14:56:07 +0200 (EET) From: Mika Westerberg To: Bjorn Helgaas Cc: "Rafael J. Wysocki" , Qipeng Zha , Qi Zheng , Mika Westerberg , linux-pci@vger.kernel.org, linux-pm@vger.kernel.org Subject: [PATCH 2/6] PCI: Make __pci_bus_set_current_state() available to other files Date: Mon, 29 Feb 2016 14:56:02 +0200 Message-Id: <1456750566-116248-3-git-send-email-mika.westerberg@linux.intel.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456750566-116248-1-git-send-email-mika.westerberg@linux.intel.com> References: <1456750566-116248-1-git-send-email-mika.westerberg@linux.intel.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We are going to take advantage of this function in PCIe root port driver so make it available for other files inside drivers/pci/* directories. Signed-off-by: Mika Westerberg --- drivers/pci/pci.c | 2 +- drivers/pci/pci.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 602eb4223510..e450b20ed4f3 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -811,7 +811,7 @@ static int __pci_dev_set_current_state(struct pci_dev *dev, void *data) * @bus: Top bus of the subtree to walk. * @state: state to be set */ -static void __pci_bus_set_current_state(struct pci_bus *bus, pci_power_t state) +void __pci_bus_set_current_state(struct pci_bus *bus, pci_power_t state) { if (bus) pci_walk_bus(bus, __pci_dev_set_current_state, &state); diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 9a1660f592ef..e021da7ad0ff 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -238,6 +238,7 @@ void __pci_bus_assign_resources(const struct pci_bus *bus, struct list_head *realloc_head, struct list_head *fail_head); bool pci_bus_clip_resource(struct pci_dev *dev, int idx); +void __pci_bus_set_current_state(struct pci_bus *bus, pci_power_t state); void pci_reassigndev_resource_alignment(struct pci_dev *dev); void pci_disable_bridge_window(struct pci_dev *dev);