Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 75826
b: refs/heads/master
c: 0fed80f
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Jan 25, 2008
1 parent 1dfc6ea commit 8f8da47
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 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: cc972e896b303f453f5893ecf8eca0d0e395ab64
refs/heads/master: 0fed80f7a63abd7168907267af69ee31f6bcf301
6 changes: 6 additions & 0 deletions trunk/drivers/base/bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,12 @@ int bus_unregister_notifier(struct bus_type *bus, struct notifier_block *nb)
}
EXPORT_SYMBOL_GPL(bus_unregister_notifier);

struct kset *bus_get_kset(struct bus_type *bus)
{
return &bus->subsys;
}
EXPORT_SYMBOL_GPL(bus_get_kset);

int __init buses_init(void)
{
bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL);
Expand Down
5 changes: 4 additions & 1 deletion trunk/drivers/pci/hotplug/pci_hotplug_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,9 +699,12 @@ int __must_check pci_hp_change_slot_info(struct hotplug_slot *slot,
static int __init pci_hotplug_init (void)
{
int result;
struct kset *pci_bus_kset;

pci_bus_kset = bus_get_kset(&pci_bus_type);

pci_hotplug_slots_kset = kset_create_and_add("slots", NULL,
&pci_bus_type.subsys.kobj);
&pci_bus_kset->kobj);
if (!pci_hotplug_slots_kset) {
result = -ENOMEM;
err("Register subsys error\n");
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/linux/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ extern int bus_unregister_notifier(struct bus_type *bus,
#define BUS_NOTIFY_UNBIND_DRIVER 0x00000004 /* driver about to be
unbound */

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

struct device_driver {
const char * name;
struct bus_type * bus;
Expand Down

0 comments on commit 8f8da47

Please sign in to comment.