mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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>
This commit is contained in:
@@ -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 *****/
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user