Re: [PATCH] USB and Driver Core patches for 2.6.10

Greg KH
2005-01-08T07:45:06Z

ChangeSet 1.1938.444.29, 2004/12/21 22:40:34-08:00, greg@kroah.com

sysfs: export the /sys/kernel subsystem for people to use.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>

include/linux/kobject.h | 2 ++
kernel/ksysfs.c | 3 ++-
2 files changed, 4 insertions(+), 1 deletion(-)

diff -Nru a/include/linux/kobject.h b/include/linux/kobject.h
--- a/include/linux/kobject.h 2005-01-07 15:40:24 -08:00
+++ b/include/linux/kobject.h 2005-01-07 15:40:24 -08:00
@@ -167,6 +167,8 @@
} \
}

+/* The global /sys/kernel/ subsystem for people to chain off of */
+extern struct subsystem kernel_subsys;

/**
* Helpers for setting the kset of registered objects.
diff -Nru a/kernel/ksysfs.c b/kernel/ksysfs.c
--- a/kernel/ksysfs.c 2005-01-07 15:40:24 -08:00
+++ b/kernel/ksysfs.c 2005-01-07 15:40:24 -08:00
@@ -30,7 +30,8 @@
KERNEL_ATTR_RO(hotplug_seqnum);
#endif

-static decl_subsys(kernel, NULL, NULL);
+decl_subsys(kernel, NULL, NULL);
+EXPORT_SYMBOL_GPL(kernel_subsys);

static struct attribute * kernel_attrs[] = {
#ifdef CONFIG_HOTPLUG