MLK-21314: crypto: caam: Fix double creation of debugfs main folder
authorFranck LENORMAND <franck.lenormand@nxp.com>
Thu, 11 Apr 2019 13:34:43 +0000 (15:34 +0200)
committerFranck LENORMAND <franck.lenormand@nxp.com>
Mon, 6 May 2019 10:27:00 +0000 (12:27 +0200)
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>
drivers/crypto/caam/ctrl.c

index c5b2ada..1dd1e2b 100644 (file)
@@ -571,17 +571,6 @@ static int enable_jobrings(struct caam_drv_private *ctrlpriv, int block_offset)
        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) {