Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 362876
b: refs/heads/master
c: 10a9574
h: refs/heads/master
v: v3
  • Loading branch information
Jiang Liu authored and Bjorn Helgaas committed Apr 12, 2013
1 parent 281163c commit fca0a39
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ce15d873d05ebf3bf38579c4e0252140e28f1781
refs/heads/master: 10a9574756201fbbdd0cac11f370f00d3d02bfa1
12 changes: 12 additions & 0 deletions trunk/drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,8 @@ static struct pci_bus *pci_alloc_child_bus(struct pci_bus *parent,
ret = device_register(&child->dev);
WARN_ON(ret < 0);

pcibios_add_bus(child);

/* Create legacy_io and legacy_mem files for this bus */
pci_create_legacy_files(child);

Expand Down Expand Up @@ -1660,6 +1662,14 @@ int __weak pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
return 0;
}

void __weak pcibios_add_bus(struct pci_bus *bus)
{
}

void __weak pcibios_remove_bus(struct pci_bus *bus)
{
}

struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
struct pci_ops *ops, void *sysdata, struct list_head *resources)
{
Expand Down Expand Up @@ -1714,6 +1724,8 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus,
if (error)
goto class_dev_reg_err;

pcibios_add_bus(b);

/* Create legacy_io and legacy_mem files for this bus */
pci_create_legacy_files(b);

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/pci/remove.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ void pci_remove_bus(struct pci_bus *bus)
pci_bus_release_busn_res(bus);
up_write(&pci_bus_sem);
pci_remove_legacy_files(bus);
pcibios_remove_bus(bus);
device_unregister(&bus->dev);
}
EXPORT_SYMBOL(pci_remove_bus);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,8 @@ extern struct list_head pci_root_buses; /* list of all known PCI buses */
extern int no_pci_devices(void);

void pcibios_resource_survey_bus(struct pci_bus *bus);
void pcibios_add_bus(struct pci_bus *bus);
void pcibios_remove_bus(struct pci_bus *bus);
void pcibios_fixup_bus(struct pci_bus *);
int __must_check pcibios_enable_device(struct pci_dev *, int mask);
/* Architecture specific versions may override this (weak) */
Expand Down

0 comments on commit fca0a39

Please sign in to comment.