• Axel Lin's avatar
    regmap: debugfs: Fix misuse of IS_ENABLED · 1635e888
    Axel Lin authored
    IS_ENABLED should only be used for CONFIG_* symbols.
    
    I have done a small test:
      #define REGMAP_ALLOW_WRITE_DEBUGFS
      IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 0.
    
      #define REGMAP_ALLOW_WRITE_DEBUGFS 0
      IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 0.
    
      #define REGMAP_ALLOW_WRITE_DEBUGFS 1
      IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 1.
    
      #define REGMAP_ALLOW_WRITE_DEBUGFS 2
      IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) returns 0.
    
    So fix the misuse of IS_ENABLED(REGMAP_ALLOW_WRITE_DEBUGFS) and switch to
    use #if defined(REGMAP_ALLOW_WRITE_DEBUGFS) instead.
    Signed-off-by: default avatarAxel Lin <axel.lin@ingics.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    1635e888
regmap-debugfs.c 16.1 KB