diff options
author | Michael Marineau <mike@marineau.org> | 2014-04-10 17:09:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-04-25 15:00:49 -0400 |
commit | 86d56134f1b67d0c18025ba5cade95c048ed528d (patch) | |
tree | caa4346965954ded259784e3b68af159e3161aeb /kernel/ksysfs.c | |
parent | d911d98748018f7c8facc035ba39c30f5cce6f9c (diff) |
kobject: Make support for uevent_helper optional.
Support for uevent_helper, aka hotplug, is not required on many systems
these days but it can still be enabled via sysfs or sysctl.
Reported-by: Darren Shepherd <darren.s.shepherd@gmail.com>
Signed-off-by: Michael Marineau <mike@marineau.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/ksysfs.c')
-rw-r--r-- | kernel/ksysfs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/ksysfs.c b/kernel/ksysfs.c index 2495a9b14ac8..6683ccef9fff 100644 --- a/kernel/ksysfs.c +++ b/kernel/ksysfs.c | |||
@@ -37,6 +37,7 @@ static ssize_t uevent_seqnum_show(struct kobject *kobj, | |||
37 | } | 37 | } |
38 | KERNEL_ATTR_RO(uevent_seqnum); | 38 | KERNEL_ATTR_RO(uevent_seqnum); |
39 | 39 | ||
40 | #ifdef CONFIG_UEVENT_HELPER | ||
40 | /* uevent helper program, used during early boot */ | 41 | /* uevent helper program, used during early boot */ |
41 | static ssize_t uevent_helper_show(struct kobject *kobj, | 42 | static ssize_t uevent_helper_show(struct kobject *kobj, |
42 | struct kobj_attribute *attr, char *buf) | 43 | struct kobj_attribute *attr, char *buf) |
@@ -56,7 +57,7 @@ static ssize_t uevent_helper_store(struct kobject *kobj, | |||
56 | return count; | 57 | return count; |
57 | } | 58 | } |
58 | KERNEL_ATTR_RW(uevent_helper); | 59 | KERNEL_ATTR_RW(uevent_helper); |
59 | 60 | #endif | |
60 | 61 | ||
61 | #ifdef CONFIG_PROFILING | 62 | #ifdef CONFIG_PROFILING |
62 | static ssize_t profiling_show(struct kobject *kobj, | 63 | static ssize_t profiling_show(struct kobject *kobj, |
@@ -189,7 +190,9 @@ EXPORT_SYMBOL_GPL(kernel_kobj); | |||
189 | static struct attribute * kernel_attrs[] = { | 190 | static struct attribute * kernel_attrs[] = { |
190 | &fscaps_attr.attr, | 191 | &fscaps_attr.attr, |
191 | &uevent_seqnum_attr.attr, | 192 | &uevent_seqnum_attr.attr, |
193 | #ifdef CONFIG_UEVENT_HELPER | ||
192 | &uevent_helper_attr.attr, | 194 | &uevent_helper_attr.attr, |
195 | #endif | ||
193 | #ifdef CONFIG_PROFILING | 196 | #ifdef CONFIG_PROFILING |
194 | &profiling_attr.attr, | 197 | &profiling_attr.attr, |
195 | #endif | 198 | #endif |