mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
ia64: simplify one-level sysctl registration for kdump_ctl_table
There is no need to declare an extra tables to just create directory, this can be easily be done with a prefix path with register_sysctl(). Simplify this registration. Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
This commit is contained in:
parent
3d51cd8ea3
commit
03860ef038
1 changed files with 1 additions and 10 deletions
|
@ -234,15 +234,6 @@ static struct ctl_table kdump_ctl_table[] = {
|
||||||
},
|
},
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct ctl_table sys_table[] = {
|
|
||||||
{
|
|
||||||
.procname = "kernel",
|
|
||||||
.mode = 0555,
|
|
||||||
.child = kdump_ctl_table,
|
|
||||||
},
|
|
||||||
{ }
|
|
||||||
};
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -257,7 +248,7 @@ machine_crash_setup(void)
|
||||||
if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0)
|
if((ret = register_die_notifier(&kdump_init_notifier_nb)) != 0)
|
||||||
return ret;
|
return ret;
|
||||||
#ifdef CONFIG_SYSCTL
|
#ifdef CONFIG_SYSCTL
|
||||||
register_sysctl_table(sys_table);
|
register_sysctl("kernel", kdump_ctl_table);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue