aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/ccp.h
diff options
context:
space:
mode:
authorTom Lendacky <thomas.lendacky@amd.com>2014-01-06 14:34:29 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2014-01-14 22:33:40 -0500
commitdb34cf9122319d6fed59bd3ba26fa099a8ece432 (patch)
treed161399362984611892d5f42cbe7f186547b9944 /include/linux/ccp.h
parent82d1585b9a9d5106ec6a630696f3e2e532fc3cba (diff)
crypto: ccp - CCP device enabled/disabled changes
The CCP cannot be hot-plugged so it will either be there or it won't. Do not allow the driver to stay loaded if the CCP does not successfully initialize. Provide stub routines in the ccp.h file that return -ENODEV if the CCP has not been configured in the build. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/linux/ccp.h')
-rw-r--r--include/linux/ccp.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/ccp.h b/include/linux/ccp.h
index 12f1cfdbd3a3..b941ab9f762b 100644
--- a/include/linux/ccp.h
+++ b/include/linux/ccp.h
@@ -23,6 +23,9 @@
23struct ccp_device; 23struct ccp_device;
24struct ccp_cmd; 24struct ccp_cmd;
25 25
26#if defined(CONFIG_CRYPTO_DEV_CCP_DD) || \
27 defined(CONFIG_CRYPTO_DEV_CCP_DD_MODULE)
28
26/** 29/**
27 * ccp_enqueue_cmd - queue an operation for processing by the CCP 30 * ccp_enqueue_cmd - queue an operation for processing by the CCP
28 * 31 *
@@ -48,6 +51,15 @@ struct ccp_cmd;
48 */ 51 */
49int ccp_enqueue_cmd(struct ccp_cmd *cmd); 52int ccp_enqueue_cmd(struct ccp_cmd *cmd);
50 53
54#else /* CONFIG_CRYPTO_DEV_CCP_DD is not enabled */
55
56static inline int ccp_enqueue_cmd(struct ccp_cmd *cmd)
57{
58 return -ENODEV;
59}
60
61#endif /* CONFIG_CRYPTO_DEV_CCP_DD */
62
51 63
52/***** AES engine *****/ 64/***** AES engine *****/
53/** 65/**