diff options
author | Michal Swiatkowski <michal.swiatkowski@linux.intel.com> | 2025-08-12 06:23:28 +0200 |
---|---|---|
committer | Tony Nguyen <anthony.l.nguyen@intel.com> | 2025-09-11 12:09:58 -0700 |
commit | dc898f7edd9bd2ce53115ce9fc12ad8dbbf20fd5 (patch) | |
tree | a9accbead2b9a7d7320fcb21109100caccccbad0 /drivers/net/ethernet/intel/ice/ice_debugfs.c | |
parent | bf59b53218bb0d3e7c9b69a3a8e3c17a3e2bcbc2 (diff) |
ice: move out debugfs init from fwlog
The root debugfs directory should be available from driver side, not
from library. Move it out from fwlog code.
Make similar to __fwlog_init() __fwlog_deinit() and deinit debugfs
there. In case of ice only fwlog is using debugfs.
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_debugfs.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_debugfs.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_debugfs.c b/drivers/net/ethernet/intel/ice/ice_debugfs.c index 9235ae099e17..b9849d1ef928 100644 --- a/drivers/net/ethernet/intel/ice/ice_debugfs.c +++ b/drivers/net/ethernet/intel/ice/ice_debugfs.c @@ -584,7 +584,6 @@ static const struct file_operations ice_debugfs_data_fops = { */ void ice_debugfs_fwlog_init(struct ice_pf *pf) { - const char *name = pci_name(pf->pdev); struct dentry *fw_modules_dir; struct dentry **fw_modules; int i; @@ -601,10 +600,6 @@ void ice_debugfs_fwlog_init(struct ice_pf *pf) if (!fw_modules) return; - pf->ice_debugfs_pf = debugfs_create_dir(name, ice_debugfs_root); - if (IS_ERR(pf->ice_debugfs_pf)) - goto err_create_module_files; - pf->ice_debugfs_pf_fwlog = debugfs_create_dir("fwlog", pf->ice_debugfs_pf); if (IS_ERR(pf->ice_debugfs_pf_fwlog)) @@ -645,6 +640,17 @@ err_create_module_files: kfree(fw_modules); } +int ice_debugfs_pf_init(struct ice_pf *pf) +{ + const char *name = pci_name(pf->pdev); + + pf->ice_debugfs_pf = debugfs_create_dir(name, ice_debugfs_root); + if (IS_ERR(pf->ice_debugfs_pf)) + return PTR_ERR(pf->ice_debugfs_pf); + + return 0; +} + /** * ice_debugfs_pf_deinit - cleanup PF's debugfs * @pf: pointer to the PF struct |