Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 81021
b: refs/heads/master
c: e60516e
h: refs/heads/master
i:
  81019: d75d876
v: v3
  • Loading branch information
Stephen Rothwell authored and Paul Mackerras committed Dec 11, 2007
1 parent 680d065 commit 6a41c30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 53761746ec98c526c7d82dcf8246cbde9f09e743
refs/heads/master: e60516e3d0bbde450acf4397b0d01b03042a7d57
21 changes: 6 additions & 15 deletions trunk/arch/powerpc/kernel/pci-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,18 @@ static DEFINE_SPINLOCK(hose_spinlock);
/* XXX kill that some day ... */
static int global_phb_number; /* Global phb counter */

/*
* pci_controller(phb) initialized common variables.
*/
static void __devinit pci_setup_pci_controller(struct pci_controller *hose)
{
memset(hose, 0, sizeof(struct pci_controller));

spin_lock(&hose_spinlock);
hose->global_number = global_phb_number++;
list_add_tail(&hose->list_node, &hose_list);
spin_unlock(&hose_spinlock);
}

struct pci_controller * pcibios_alloc_controller(struct device_node *dev)
struct pci_controller *pcibios_alloc_controller(struct device_node *dev)
{
struct pci_controller *phb;

phb = alloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
phb = zalloc_maybe_bootmem(sizeof(struct pci_controller), GFP_KERNEL);
if (phb == NULL)
return NULL;
pci_setup_pci_controller(phb);
spin_lock(&hose_spinlock);
phb->global_number = global_phb_number++;
list_add_tail(&phb->list_node, &hose_list);
spin_unlock(&hose_spinlock);
phb->arch_data = dev;
phb->is_dynamic = mem_init_done;
#ifdef CONFIG_PPC64
Expand Down

0 comments on commit 6a41c30

Please sign in to comment.