Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=59a548338ac6c9d7549c54278d0f724088585928
Commit:     59a548338ac6c9d7549c54278d0f724088585928
Parent:     bd35b93d8049ab47b5bfaf6b10ba39badf21d1c3
Author:     Greg Kroah-Hartman <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 29 23:22:26 2007 -0500
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Jan 24 20:40:14 2008 -0800

    kset: convert drivers/base/bus.c to use kset_create
    
    Dynamically create the kset instead of declaring it statically.
    
    Cc: Kay Sievers <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/base/bus.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 6309560..e3b1010 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -166,7 +166,7 @@ static struct kset_uevent_ops bus_uevent_ops = {
        .filter = bus_uevent_filter,
 };
 
-static decl_subsys(bus, &bus_uevent_ops);
+static struct kset *bus_kset;
 
 
 #ifdef CONFIG_HOTPLUG
@@ -767,7 +767,7 @@ EXPORT_SYMBOL_GPL(device_reprobe);
 #if 0
 struct bus_type * find_bus(char * name)
 {
-       struct kobject * k = kset_find_obj(&bus_subsys.kset, name);
+       struct kobject * k = kset_find_obj(bus_kset, name);
        return k ? to_bus(k) : NULL;
 }
 #endif  /*  0  */
@@ -851,7 +851,7 @@ int bus_register(struct bus_type * bus)
        if (retval)
                goto out;
 
-       bus->subsys.kobj.kset = &bus_subsys;
+       bus->subsys.kobj.kset = bus_kset;
        bus->subsys.kobj.ktype = &bus_ktype;
 
        retval = subsystem_register(&bus->subsys);
@@ -935,7 +935,10 @@ EXPORT_SYMBOL_GPL(bus_unregister_notifier);
 
 int __init buses_init(void)
 {
-       return subsystem_register(&bus_subsys);
+       bus_kset = kset_create_and_add("bus", &bus_uevent_ops, NULL);
+       if (!bus_kset)
+               return -ENOMEM;
+       return 0;
 }
 
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to