Commit 71cb8c00 authored by Luis Chamberlain's avatar Luis Chamberlain Committed by Heiko Carstens

s390: simplify one-level sysctl registration for appldata_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: default avatarLuis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20230310234525.3986352-4-mcgrof@kernel.orgReviewed-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
parent 751e2407
...@@ -66,16 +66,6 @@ static struct ctl_table appldata_table[] = { ...@@ -66,16 +66,6 @@ static struct ctl_table appldata_table[] = {
{ }, { },
}; };
static struct ctl_table appldata_dir_table[] = {
{
.procname = appldata_proc_name,
.maxlen = 0,
.mode = S_IRUGO | S_IXUGO,
.child = appldata_table,
},
{ },
};
/* /*
* Timer * Timer
*/ */
...@@ -422,7 +412,7 @@ static int __init appldata_init(void) ...@@ -422,7 +412,7 @@ static int __init appldata_init(void)
appldata_wq = alloc_ordered_workqueue("appldata", 0); appldata_wq = alloc_ordered_workqueue("appldata", 0);
if (!appldata_wq) if (!appldata_wq)
return -ENOMEM; return -ENOMEM;
appldata_sysctl_header = register_sysctl_table(appldata_dir_table); appldata_sysctl_header = register_sysctl(appldata_proc_name, appldata_table);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment