From: rmk+kernel@arm.linux.org.uk (Russell King)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 8/8] ARM: PCI: remove per-pci_hw list of buses
Date: Thu, 26 Apr 2012 11:19:17 +0100 [thread overview]
Message-ID: <E1SNLnB-00081I-Sl@rmk-PC.arm.linux.org.uk> (raw)
In-Reply-To: <20120426101626.GE24211@n2100.arm.linux.org.uk>
No one uses the per-hw list of buses, so get rid of this. Instead,
build the list locally.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
arch/arm/include/asm/mach/pci.h | 1 -
arch/arm/kernel/bios32.c | 11 +++++------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/arm/include/asm/mach/pci.h b/arch/arm/include/asm/mach/pci.h
index b4b94b4..26c511f 100644
--- a/arch/arm/include/asm/mach/pci.h
+++ b/arch/arm/include/asm/mach/pci.h
@@ -19,7 +19,6 @@ struct hw_pci {
#ifdef CONFIG_PCI_DOMAINS
int domain;
#endif
- struct list_head buses;
struct pci_ops *ops;
int nr_controllers;
int (*setup)(int nr, struct pci_sys_data *);
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c
index 00a506f..2555250 100644
--- a/arch/arm/kernel/bios32.c
+++ b/arch/arm/kernel/bios32.c
@@ -423,7 +423,7 @@ static int pcibios_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
return irq;
}
-static void __init pcibios_init_hw(struct hw_pci *hw)
+static void __init pcibios_init_hw(struct hw_pci *hw, struct list_head *head)
{
struct pci_sys_data *sys = NULL;
int ret;
@@ -463,7 +463,7 @@ static void __init pcibios_init_hw(struct hw_pci *hw)
busnr = sys->bus->subordinate + 1;
- list_add(&sys->node, &hw->buses);
+ list_add(&sys->node, head);
} else {
kfree(sys);
if (ret < 0)
@@ -475,19 +475,18 @@ static void __init pcibios_init_hw(struct hw_pci *hw)
void __init pci_common_init(struct hw_pci *hw)
{
struct pci_sys_data *sys;
-
- INIT_LIST_HEAD(&hw->buses);
+ LIST_HEAD(head);
pci_add_flags(PCI_REASSIGN_ALL_RSRC);
if (hw->preinit)
hw->preinit();
- pcibios_init_hw(hw);
+ pcibios_init_hw(hw, &head);
if (hw->postinit)
hw->postinit();
pci_fixup_irqs(pcibios_swizzle, pcibios_map_irq);
- list_for_each_entry(sys, &hw->buses, node) {
+ list_for_each_entry(sys, &head, node) {
struct pci_bus *bus = sys->bus;
if (!pci_has_flag(PCI_PROBE_ONLY)) {
--
1.7.4.4
prev parent reply other threads:[~2012-04-26 10:19 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-26 10:16 [PATCH 0/8] ARM PCI cleanups Russell King - ARM Linux
2012-04-26 10:16 ` [PATCH 1/8] ARM: PCI: remove unused sys->hw Russell King
2012-05-21 14:35 ` Thierry Reding
2012-05-21 14:57 ` Russell King - ARM Linux
2012-05-21 17:29 ` Thierry Reding
2012-04-26 10:17 ` [PATCH 2/8] ARM: PCI: footbridge: provide a 'no swizzle' function for CATS Russell King
2012-04-26 10:17 ` [PATCH 3/8] ARM: PCI: integrator: use common PCI swizzle Russell King
2012-04-26 10:17 ` [PATCH 4/8] ARM: PCI: versatile: fix PCI interrupt setup Russell King
2012-04-26 10:18 ` [PATCH 5/8] ARM: PCI: get rid of pci_std_swizzle() Russell King
2012-04-28 15:21 ` Krzysztof Halasa
2012-04-26 10:18 ` [PATCH 6/8] ARM: PCI: provide a default bus scan implementation Russell King
2012-04-28 15:22 ` Krzysztof Halasa
2012-04-26 10:18 ` [PATCH 7/8] ARM: PCI: dove/kirkwood/mv78xx0: use sys->private_data Russell King
2012-04-26 10:19 ` Russell King [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E1SNLnB-00081I-Sl@rmk-PC.arm.linux.org.uk \
--to=rmk+kernel@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).