summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2004-09-08 07:25:19 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2004-09-08 07:25:19 -0700
commitdd18ea08511c8f613d59230fad7e2dc2f6b44f75 (patch)
treeb0e635a2c3832b29dca7b4106ae4c9d028e466bb /kernel
parent9556fb2e719d2ce09c9c24d05a963cd8d974ce21 (diff)
[PATCH] ksyms: don't implement /sys/kernel/hotplug_seqnum if CONFIG_HOTPLUG is not enabled.
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/ksysfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c
index d3b31e6b1c2f..9772c74464f8 100644
--- a/kernel/ksysfs.c
+++ b/kernel/ksysfs.c
@@ -22,17 +22,20 @@ static struct subsys_attribute _name##_attr = __ATTR_RO(_name)
static struct subsys_attribute _name##_attr = \
__ATTR(_name, 0644, _name##_show, _name##_store)
+#ifdef CONFIG_HOTPLUG
static ssize_t hotplug_seqnum_show(struct subsystem *subsys, char *page)
{
return sprintf(page, "%llu\n", hotplug_seqnum);
}
KERNEL_ATTR_RO(hotplug_seqnum);
-
+#endif
static decl_subsys(kernel, NULL, NULL);
static struct attribute * kernel_attrs[] = {
+#ifdef CONFIG_HOTPLUG
&hotplug_seqnum_attr.attr,
+#endif
NULL
};
@@ -44,7 +47,8 @@ static int __init ksysfs_init(void)
{
int error = subsystem_register(&kernel_subsys);
if (!error)
- error = sysfs_create_group(&kernel_subsys.kset.kobj, &kernel_attr_group);
+ error = sysfs_create_group(&kernel_subsys.kset.kobj,
+ &kernel_attr_group);
return error;
}