diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2014-01-06 13:34:29 -0600 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-01-15 11:33:40 +0800 |
commit | db34cf9122319d6fed59bd3ba26fa099a8ece432 (patch) | |
tree | d161399362984611892d5f42cbe7f186547b9944 /include/linux/ccp.h | |
parent | 82d1585b9a9d5106ec6a630696f3e2e532fc3cba (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.h | 12 |
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 @@ struct ccp_device; struct ccp_cmd; +#if defined(CONFIG_CRYPTO_DEV_CCP_DD) || \ + defined(CONFIG_CRYPTO_DEV_CCP_DD_MODULE) + /** * ccp_enqueue_cmd - queue an operation for processing by the CCP * @@ -48,6 +51,15 @@ struct ccp_cmd; */ int ccp_enqueue_cmd(struct ccp_cmd *cmd); +#else /* CONFIG_CRYPTO_DEV_CCP_DD is not enabled */ + +static inline int ccp_enqueue_cmd(struct ccp_cmd *cmd) +{ + return -ENODEV; +} + +#endif /* CONFIG_CRYPTO_DEV_CCP_DD */ + /***** AES engine *****/ /** |