sgi-xp: simplify sysctl registration
authorLuis Chamberlain <mcgrof@kernel.org>
Thu, 2 Mar 2023 20:46:10 +0000 (12:46 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Mar 2023 16:32:13 +0000 (17:32 +0100)
commitb085dbf6c955c34f735cac433f8551832138e154
tree54bca5d5835627249a7f363789946ab61166d0bc
parent9263271a61fcb07b8a30379e785391415d10aa72
sgi-xp: simplify sysctl registration

Although this driver is a good use case for having a directory
that is not other directories and then subdirectories with more
entries, the usage of register_sysctl_table() can recurse and
increases complexity so to avoid that just split out the
registration to each directory with its own entries.

register_sysctl_table() is a deprecated compatibility wrapper.
register_sysctl() can do the directory creation for you so just use
that.

Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Steve Wahl <steve.wahl@hpe.com>
Link: https://lore.kernel.org/r/20230302204612.782387-6-mcgrof@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/sgi-xp/xpc_main.c