The creation of the root directory for the control driver of
the CAAM was done in enable_jobrings() and in init_debugfs()
stored in the variable dfs_root.
Both calls uses the same arguments hence the second creation
overrides the first one resulting in 2 entries in the debug FS
with the first one empty.
This patch removes the call from enable_jobrings().
The debug folder can be found in /sys/kernel/debug/*caam/ctl.
Fixes:
de9807e6e0de (MLK-15473-1: crypto: caam: Add CAAM driver support for iMX8 soc family)
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
struct device_node *nprop, *np;
struct device *dev = ctrlpriv->dev;
-#ifdef CONFIG_DEBUG_FS
- /*
- * FIXME: needs better naming distinction, as some amalgamation of
- * "caam" and nprop->full_name. The OF name isn't distinctive,
- * but does separate instances
- */
-
- ctrlpriv->dfs_root = debugfs_create_dir(dev_name(dev), NULL);
- ctrlpriv->ctl = debugfs_create_dir("ctl", ctrlpriv->dfs_root);
-#endif
-
nprop = ctrlpriv->pdev->dev.of_node;
ret = of_platform_populate(nprop, NULL, NULL, dev);
if (ret) {