• Damian Muszynski's avatar
    crypto: qat - move dbgfs init to separate file · 9260db66
    Damian Muszynski authored
    Move initialization of debugfs entries to a separate file.
    This simplifies the exclusion of the debugfs logic in the QAT driver
    when the kernel is built with CONFIG_DEBUG_FS=n.
    In addition, it will allow to consolidate the addition of debugfs
    entries to a single location in the code.
    
    This implementation adds infrastructure to create (and remove) debugfs
    entries at two different stages. The first, done when a device is probed,
    allows to keep debugfs entries persistent between a transition in device
    state (up to down or vice versa). The second, done after the initialization
    phase, allows to have debugfs entries that are accessible only when
    the device is up.
    
    In addition, move the creation of debugfs entries for configuration
    to the newly created function adf_dbgfs_init() and replace symbolic
    permissions with octal permissions when creating the debugfs files.
    This is to resolve the following warning reported by checkpatch:
    
      WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'.
    Signed-off-by: default avatarDamian Muszynski <damian.muszynski@intel.com>
    Reviewed-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
    Signed-off-by: default avatarGiovanni Cabiddu <giovanni.cabiddu@intel.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    9260db66
adf_drv.c 6.51 KB