summaryrefslogtreecommitdiff
path: root/drivers/crypto/ccp/ccp-dev-v5.c
diff options
context:
space:
mode:
authorHook, Gary <Gary.Hook@amd.com>2019-07-09 18:07:15 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2019-07-26 15:08:03 +0300
commit93308baf075039dccf347391491773f272cc24f6 (patch)
tree83226deeda7724a9ae8db464c3d17a2d992b5cd8 /drivers/crypto/ccp/ccp-dev-v5.c
parent91b05a7e7d8033a90a64f5fc0e3808db423e420a (diff)
downloadlinux-93308baf075039dccf347391491773f272cc24f6.tar.xz
crypto: ccp - Make CCP debugfs support optional
Add a config option to exclude DebugFS support in the CCP driver. Signed-off-by: Gary R Hook <gary.hook@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccp/ccp-dev-v5.c')
-rw-r--r--drivers/crypto/ccp/ccp-dev-v5.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/crypto/ccp/ccp-dev-v5.c b/drivers/crypto/ccp/ccp-dev-v5.c
index 217e41bbadaf..35b3d866726d 100644
--- a/drivers/crypto/ccp/ccp-dev-v5.c
+++ b/drivers/crypto/ccp/ccp-dev-v5.c
@@ -970,8 +970,10 @@ static int ccp5_init(struct ccp_device *ccp)
if (ret)
goto e_hwrng;
+#ifdef CONFIG_CRYPTO_DEV_CCP_DEBUGFS
/* Set up debugfs entries */
ccp5_debugfs_setup(ccp);
+#endif
return 0;
@@ -1009,11 +1011,13 @@ static void ccp5_destroy(struct ccp_device *ccp)
/* Remove this device from the list of available units first */
ccp_del_device(ccp);
+#ifdef CONFIG_CRYPTO_DEV_CCP_DEBUGFS
/* We're in the process of tearing down the entire driver;
* when all the devices are gone clean up debugfs
*/
if (ccp_present())
ccp5_debugfs_destroy();
+#endif
/* Disable and clear interrupts */
ccp5_disable_queue_interrupts(ccp);