diff options
| author | Joel Granados <joel.granados@kernel.org> | 2025-06-27 09:29:56 +0200 |
|---|---|---|
| committer | Joel Granados <joel.granados@kernel.org> | 2025-07-23 11:56:02 +0200 |
| commit | 88eddb0502d45680efef870ea470a9e8955c5c8b (patch) | |
| tree | 1835e31910b5e5e31bb0ac25cc8768aeea47cc89 /lib | |
| parent | sysctl: Removed unused variable (diff) | |
| download | linux-88eddb0502d45680efef870ea470a9e8955c5c8b.tar.gz linux-88eddb0502d45680efef870ea470a9e8955c5c8b.zip | |
uevent: mv uevent_helper into kobject_uevent.c
Move both uevent_helper table into lib/kobject_uevent.c. Place the
registration early in the initcall order with postcore_initcall.
This is part of a greater effort to move ctl tables into their
respective subsystems which will reduce the merge conflicts in
kernel/sysctl.c.
Signed-off-by: Joel Granados <joel.granados@kernel.org>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/kobject_uevent.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index b7f2fa08d9c8..78e16b95d210 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c @@ -826,3 +826,23 @@ static int __init kobject_uevent_init(void) postcore_initcall(kobject_uevent_init); #endif + +#ifdef CONFIG_UEVENT_HELPER +static const struct ctl_table uevent_helper_sysctl_table[] = { + { + .procname = "hotplug", + .data = &uevent_helper, + .maxlen = UEVENT_HELPER_PATH_LEN, + .mode = 0644, + .proc_handler = proc_dostring, + }, +}; + +static int __init init_uevent_helper_sysctl(void) +{ + register_sysctl_init("kernel", uevent_helper_sysctl_table); + return 0; +} + +postcore_initcall(init_uevent_helper_sysctl); +#endif |
