lkml.org 
[lkml]   [2023]   [May]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v4 4/8] parport: Remove register_sysctl_table from parport_default_proc_register
    Date
    This is part of the general push to deprecate register_sysctl_paths and
    register_sysctl_table. Simply change the full path "dev/parport/default"
    to point to an already existing set of table entries (vars). We also
    remove the unused elements from parport_default_table.

    To make sure the resulting directory structure did not change we
    made sure that `find /proc/sys/dev/ | sha1sum` was the same before and
    after the change.

    Signed-off-by: Joel Granados <j.granados@samsung.com>
    Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
    Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
    ---
    drivers/parport/procfs.c | 18 +-----------------
    1 file changed, 1 insertion(+), 17 deletions(-)

    diff --git a/drivers/parport/procfs.c b/drivers/parport/procfs.c
    index 22d211c95168..1a26918d2cc8 100644
    --- a/drivers/parport/procfs.c
    +++ b/drivers/parport/procfs.c
    @@ -430,22 +430,6 @@ parport_default_sysctl_table = {
    .extra2 = (void*) &parport_max_spintime_value
    },
    {}
    - },
    - {
    - {
    - .procname = "default",
    - .mode = 0555,
    - .child = parport_default_sysctl_table.vars
    - },
    - {}
    - },
    - {
    - PARPORT_PARPORT_DIR(parport_default_sysctl_table.default_dir),
    - {}
    - },
    - {
    - PARPORT_DEV_DIR(parport_default_sysctl_table.parport_dir),
    - {}
    }
    };

    @@ -601,7 +585,7 @@ static int __init parport_default_proc_register(void)
    int ret;

    parport_default_sysctl_table.sysctl_header =
    - register_sysctl_table(parport_default_sysctl_table.dev_dir);
    + register_sysctl("dev/parport/default", parport_default_sysctl_table.vars);
    if (!parport_default_sysctl_table.sysctl_header)
    return -ENOMEM;
    ret = parport_bus_init();
    --
    2.30.2
    \
     
     \ /
      Last update: 2023-05-23 14:23    [W:4.254 / U:0.148 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site