Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75827
b: refs/heads/master
c: b249072
h: refs/heads/master
i:
  75825: 1dfc6ea
  75823: ee821f6
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 25, 2008
1 parent 8f8da47 commit a8ce0f0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 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: 0fed80f7a63abd7168907267af69ee31f6bcf301
refs/heads/master: b249072ee6897fe4f8d461c7bb4b926223263c28
6 changes: 6 additions & 0 deletions trunk/drivers/base/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,12 @@ struct kset *bus_get_kset(struct bus_type *bus)
}
EXPORT_SYMBOL_GPL(bus_get_kset);

struct klist *bus_get_device_klist(struct bus_type *bus)
{
return &bus->klist_devices;
}
EXPORT_SYMBOL_GPL(bus_get_device_klist);

int __init buses_init(void)
{
bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL);
Expand Down
11 changes: 7 additions & 4 deletions trunk/drivers/pci/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1210,16 +1210,19 @@ static void __init pci_sort_breadthfirst_klist(void)
struct klist_node *n;
struct device *dev;
struct pci_dev *pdev;
struct klist *device_klist;

spin_lock(&pci_bus_type.klist_devices.k_lock);
list_for_each_safe(pos, tmp, &pci_bus_type.klist_devices.k_list) {
device_klist = bus_get_device_klist(&pci_bus_type);

spin_lock(&device_klist->k_lock);
list_for_each_safe(pos, tmp, &device_klist->k_list) {
n = container_of(pos, struct klist_node, n_node);
dev = container_of(n, struct device, knode_bus);
pdev = to_pci_dev(dev);
pci_insertion_sort_klist(pdev, &sorted_devices);
}
list_splice(&sorted_devices, &pci_bus_type.klist_devices.k_list);
spin_unlock(&pci_bus_type.klist_devices.k_lock);
list_splice(&sorted_devices, &device_klist->k_list);
spin_unlock(&device_klist->k_lock);
}

static void __init pci_insertion_sort_devices(struct pci_dev *a, struct list_head *list)
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ extern int bus_unregister_notifier(struct bus_type *bus,
unbound */

extern struct kset *bus_get_kset(struct bus_type *bus);
extern struct klist *bus_get_device_klist(struct bus_type *bus);

struct device_driver {
const char * name;
Expand Down

0 comments on commit a8ce0f0

Please sign in to comment.