Skip to content

Commit

Permalink
csky: simplify alignment sysctl registration
Browse files Browse the repository at this point in the history
Using register_sysctl_paths() is only required if we are using
leafs with entries but all we are doing is creates leafs with
just one leaf and then entries and register_sysctl_init() works
well with that already.

The 555 permission is already retained by the new_dir() proc
sysctl directory creator.

Signed-off-by: Luis Chamberlain <[email protected]>
  • Loading branch information
mcgrof committed Apr 13, 2023
1 parent 02a6b45 commit adf11ea
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions arch/csky/abiv1/alignment.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,22 +332,9 @@ static struct ctl_table alignment_tbl[5] = {
{}
};

static struct ctl_table sysctl_table[2] = {
{
.procname = "csky_alignment",
.mode = 0555,
.child = alignment_tbl},
{}
};

static struct ctl_path sysctl_path[2] = {
{.procname = "csky"},
{}
};

static int __init csky_alignment_init(void)
{
register_sysctl_paths(sysctl_path, sysctl_table);
register_sysctl_init("csky/csky_alignment", alignment_tbl);
return 0;
}

Expand Down

0 comments on commit adf11ea

Please sign in to comment.