drivers: crypto: Place API into iterable section
Add wrapper DEVICE_API macro to all crypto_driver_api instances. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
parent
3775e197e6
commit
45be45d7e0
14 changed files with 14 additions and 14 deletions
|
@ -875,7 +875,7 @@ static const struct ataes132a_device_config ataes132a_config = {
|
|||
.i2c = I2C_DT_SPEC_INST_GET(0),
|
||||
};
|
||||
|
||||
static struct crypto_driver_api crypto_enc_funcs = {
|
||||
static DEVICE_API(crypto, crypto_enc_funcs) = {
|
||||
.cipher_begin_session = ataes132a_session_setup,
|
||||
.cipher_free_session = ataes132a_session_free,
|
||||
.cipher_async_callback_set = NULL,
|
||||
|
|
|
@ -325,7 +325,7 @@ static int intel_sha_device_hw_caps(const struct device *dev)
|
|||
return (CAP_SEPARATE_IO_BUFS | CAP_SYNC_OPS);
|
||||
}
|
||||
|
||||
static struct crypto_driver_api hash_enc_funcs = {
|
||||
static DEVICE_API(crypto, hash_enc_funcs) = {
|
||||
.hash_begin_session = intel_sha_device_set_hash_type,
|
||||
.hash_free_session = intel_sha_device_free,
|
||||
.hash_async_callback_set = NULL,
|
||||
|
|
|
@ -215,7 +215,7 @@ static int it8xxx2_sha_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct crypto_driver_api it8xxx2_crypto_api = {
|
||||
static DEVICE_API(crypto, it8xxx2_crypto_api) = {
|
||||
.hash_begin_session = it8xxx2_hash_begin_session,
|
||||
.hash_free_session = it8xxx2_hash_session_free,
|
||||
.query_hw_caps = it8xxx2_query_hw_caps,
|
||||
|
|
|
@ -340,7 +340,7 @@ static int it8xxx2_sha_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct crypto_driver_api it8xxx2_crypto_api = {
|
||||
static DEVICE_API(crypto, it8xxx2_crypto_api) = {
|
||||
.hash_begin_session = it8xxx2_hash_begin_session,
|
||||
.hash_free_session = it8xxx2_hash_session_free,
|
||||
.query_hw_caps = it8xxx2_query_hw_caps,
|
||||
|
|
|
@ -514,7 +514,7 @@ static int xec_symcr_init(const struct device *dev)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static const struct crypto_driver_api xec_symcr_api = {
|
||||
static DEVICE_API(crypto, xec_symcr_api) = {
|
||||
.query_hw_caps = xec_symcr_query_hw_caps,
|
||||
.hash_begin_session = xec_symcr_hash_session_begin,
|
||||
.hash_free_session = xec_symcr_hash_session_free,
|
||||
|
|
|
@ -331,7 +331,7 @@ static int crypto_dcp_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct crypto_driver_api crypto_dcp_api = {
|
||||
static DEVICE_API(crypto, crypto_dcp_api) = {
|
||||
.query_hw_caps = crypto_dcp_query_hw_caps,
|
||||
.cipher_begin_session = crypto_dcp_cipher_begin_session,
|
||||
.cipher_free_session = crypto_dcp_cipher_free_session,
|
||||
|
|
|
@ -599,7 +599,7 @@ static int mtls_query_caps(const struct device *dev)
|
|||
return MTLS_SUPPORT;
|
||||
}
|
||||
|
||||
static struct crypto_driver_api mtls_crypto_funcs = {
|
||||
static DEVICE_API(crypto, mtls_crypto_funcs) = {
|
||||
.cipher_begin_session = mtls_session_setup,
|
||||
.cipher_free_session = mtls_session_free,
|
||||
.cipher_async_callback_set = NULL,
|
||||
|
|
|
@ -202,7 +202,7 @@ static int npcx_hash_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct crypto_driver_api npcx_crypto_api = {
|
||||
static DEVICE_API(crypto, npcx_crypto_api) = {
|
||||
.hash_begin_session = npcx_hash_session_setup,
|
||||
.hash_free_session = npcx_hash_session_free,
|
||||
.query_hw_caps = npcx_query_caps,
|
||||
|
|
|
@ -132,7 +132,7 @@ static int nrf_ecb_session_free(const struct device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static const struct crypto_driver_api crypto_enc_funcs = {
|
||||
static DEVICE_API(crypto, crypto_enc_funcs) = {
|
||||
.cipher_begin_session = nrf_ecb_session_setup,
|
||||
.cipher_free_session = nrf_ecb_session_free,
|
||||
.cipher_async_callback_set = NULL,
|
||||
|
|
|
@ -1194,7 +1194,7 @@ static int crypto_si32_free_session(const struct device *dev, struct cipher_ctx
|
|||
}
|
||||
|
||||
/* AES only, no support for hashing */
|
||||
static const struct crypto_driver_api crypto_si32_api = {
|
||||
static DEVICE_API(crypto, crypto_si32_api) = {
|
||||
.query_hw_caps = crypto_si32_query_hw_caps,
|
||||
.cipher_begin_session = crypto_si32_begin_session,
|
||||
.cipher_free_session = crypto_si32_free_session,
|
||||
|
|
|
@ -921,7 +921,7 @@ crypto_smartbond_hash_set_async_callback(const struct device *dev, hash_completi
|
|||
}
|
||||
#endif
|
||||
|
||||
static const struct crypto_driver_api crypto_smartbond_driver_api = {
|
||||
static DEVICE_API(crypto, crypto_smartbond_driver_api) = {
|
||||
.cipher_begin_session = crypto_smartbond_cipher_begin_session,
|
||||
.cipher_free_session = crypto_smartbond_cipher_free_session,
|
||||
#if defined(CONFIG_CRYPTO_ASYNC)
|
||||
|
|
|
@ -541,7 +541,7 @@ static int crypto_stm32_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct crypto_driver_api crypto_enc_funcs = {
|
||||
static DEVICE_API(crypto, crypto_enc_funcs) = {
|
||||
.cipher_begin_session = crypto_stm32_session_setup,
|
||||
.cipher_free_session = crypto_stm32_session_free,
|
||||
.cipher_async_callback_set = NULL,
|
||||
|
|
|
@ -314,7 +314,7 @@ static int tc_shim_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct crypto_driver_api crypto_enc_funcs = {
|
||||
static DEVICE_API(crypto, crypto_enc_funcs) = {
|
||||
.cipher_begin_session = tc_session_setup,
|
||||
.cipher_free_session = tc_session_free,
|
||||
.cipher_async_callback_set = NULL,
|
||||
|
|
|
@ -1397,7 +1397,7 @@ static int cc2520_crypto_init(const struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
struct crypto_driver_api cc2520_crypto_api = {
|
||||
DEVICE_API(crypto, cc2520_crypto_api) = {
|
||||
.query_hw_caps = cc2520_crypto_hw_caps,
|
||||
.cipher_begin_session = cc2520_crypto_begin_session,
|
||||
.cipher_free_session = cc2520_crypto_free_session,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue