• Rusty Russell's avatar
    param: Fix duplicate module prefixes · 9b473de8
    Rusty Russell authored
    Instead of insisting each new module_param sysfs entry is unique,
    handle the case where it already exists (for builtin modules).
    
    The current code assumes that all identical prefixes are together in
    the section: true for normal uses, but not necessarily so if someone
    overrides MODULE_PARAM_PREFIX.  More importantly, it's not true with
    the new "core_param()" code which uses "kernel" as a prefix.
    
    This simplifies the caller for the builtin case, at a slight loss of
    efficiency (we do the lookup every time to see if the directory
    exists).
    Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
    Cc: Greg Kroah-Hartman <gregkh@suse.de>
    9b473de8
module.h 16.5 KB