From patchwork Wed Sep 19 18:54:37 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yinghai Lu X-Patchwork-Id: 1479561 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 77EED3FE79 for ; Wed, 19 Sep 2012 19:00:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932315Ab2ISTAe (ORCPT ); Wed, 19 Sep 2012 15:00:34 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:19698 "EHLO rcsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756992Ab2ISSza (ORCPT ); Wed, 19 Sep 2012 14:55:30 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8JItIsY024052 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 Sep 2012 18:55:19 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8JItHAs012380 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 19 Sep 2012 18:55:18 GMT Received: from abhmt109.oracle.com (abhmt109.oracle.com [141.146.116.61]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8JItHgJ029903; Wed, 19 Sep 2012 13:55:17 -0500 Received: from linux-siqj.site (/10.132.126.191) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 19 Sep 2012 11:55:17 -0700 From: Yinghai Lu To: Bjorn Helgaas , Len Brown , Taku Izumi , Jiang Liu , x86 Cc: Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Yinghai Lu Subject: [PATCH 23/40] PCI, ACPI: Pass device instead of handle when config root bridge Date: Wed, 19 Sep 2012 11:54:37 -0700 Message-Id: <1348080894-23412-24-git-send-email-yinghai@kernel.org> X-Mailer: git-send-email 1.7.7 In-Reply-To: <1348080894-23412-1-git-send-email-yinghai@kernel.org> References: <1348080894-23412-1-git-send-email-yinghai@kernel.org> X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org So we can avoid one calling of acpi_pci_find_root(). Signed-off-by: Yinghai Lu --- drivers/acpi/pci_root_hp.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/pci_root_hp.c b/drivers/acpi/pci_root_hp.c index e07c31b..eb4344c 100644 --- a/drivers/acpi/pci_root_hp.c +++ b/drivers/acpi/pci_root_hp.c @@ -102,9 +102,9 @@ static void alloc_acpi_root_hp_work(acpi_handle handle, u32 type, } /* Program resources in newly inserted bridge */ -static void acpi_root_configure_bridge(acpi_handle handle) +static void acpi_root_configure_bridge(struct acpi_device *device) { - struct acpi_pci_root *root = acpi_pci_find_root(handle); + struct acpi_pci_root *root = acpi_driver_data(device); pcibios_resource_survey_bus(root->bus); pci_assign_unassigned_bus_resources(root->bus); @@ -138,7 +138,7 @@ static void handle_root_bridge_insertion(acpi_handle handle) printk(KERN_ERR "cannot add bridge to acpi list\n"); return; } - acpi_root_configure_bridge(handle); + acpi_root_configure_bridge(device); if (acpi_bus_start(device)) printk(KERN_ERR "cannot start bridge\n"); }