• Guenter Roeck's avatar
    regulator: Ensure unique regulator debugfs directory names · a9eaa813
    Guenter Roeck authored
    If multiple regulator devices of the same type exist in a system,
    the regulator driver assigns generic names for the regulators it
    provides, and debugfs is enabled, the regulator subsystem attempts
    to create multiple entries with the same name in the regulator debugfs
    directory. This fails for all but the first regulator, resulting in
    multiple "Failed to create debugfs directory" log entries.
    
    To avoid the problem, prepend the debugfs directory name for a regulator
    with its parent device name if available, but only if no explicit
    regulator name was provided.
    
    Cc: Alan Tull <atull@opensource.altera.com>
    Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    a9eaa813
core.c 104 KB