diff --git a/drivers/crypto/crypto_ataes132a.c b/drivers/crypto/crypto_ataes132a.c index 4696272fc5619..192cbf997d218 100644 --- a/drivers/crypto/crypto_ataes132a.c +++ b/drivers/crypto/crypto_ataes132a.c @@ -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, diff --git a/drivers/crypto/crypto_intel_sha.c b/drivers/crypto/crypto_intel_sha.c index c0722fa18ce17..54934f5949a4c 100644 --- a/drivers/crypto/crypto_intel_sha.c +++ b/drivers/crypto/crypto_intel_sha.c @@ -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, diff --git a/drivers/crypto/crypto_it8xxx2_sha.c b/drivers/crypto/crypto_it8xxx2_sha.c index 3fea42f217d28..5ce174ab237ee 100644 --- a/drivers/crypto/crypto_it8xxx2_sha.c +++ b/drivers/crypto/crypto_it8xxx2_sha.c @@ -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, diff --git a/drivers/crypto/crypto_it8xxx2_sha_v2.c b/drivers/crypto/crypto_it8xxx2_sha_v2.c index 6da1cff4c2942..3098bf4b9b5e0 100644 --- a/drivers/crypto/crypto_it8xxx2_sha_v2.c +++ b/drivers/crypto/crypto_it8xxx2_sha_v2.c @@ -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, diff --git a/drivers/crypto/crypto_mchp_xec_symcr.c b/drivers/crypto/crypto_mchp_xec_symcr.c index 6bcf4f17c854a..0845009802457 100644 --- a/drivers/crypto/crypto_mchp_xec_symcr.c +++ b/drivers/crypto/crypto_mchp_xec_symcr.c @@ -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, diff --git a/drivers/crypto/crypto_mcux_dcp.c b/drivers/crypto/crypto_mcux_dcp.c index 23232ed9b57cd..a415e108821a2 100644 --- a/drivers/crypto/crypto_mcux_dcp.c +++ b/drivers/crypto/crypto_mcux_dcp.c @@ -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, diff --git a/drivers/crypto/crypto_mtls_shim.c b/drivers/crypto/crypto_mtls_shim.c index 071b3593f338d..2031e7d7c987b 100644 --- a/drivers/crypto/crypto_mtls_shim.c +++ b/drivers/crypto/crypto_mtls_shim.c @@ -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, diff --git a/drivers/crypto/crypto_npcx_sha.c b/drivers/crypto/crypto_npcx_sha.c index 20c817f1cf903..65da0cb5dcf0f 100644 --- a/drivers/crypto/crypto_npcx_sha.c +++ b/drivers/crypto/crypto_npcx_sha.c @@ -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, diff --git a/drivers/crypto/crypto_nrf_ecb.c b/drivers/crypto/crypto_nrf_ecb.c index 9fa354738ae55..1ab06eacd34aa 100644 --- a/drivers/crypto/crypto_nrf_ecb.c +++ b/drivers/crypto/crypto_nrf_ecb.c @@ -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, diff --git a/drivers/crypto/crypto_si32.c b/drivers/crypto/crypto_si32.c index e933852e7a5fa..2a4dbd11605ea 100644 --- a/drivers/crypto/crypto_si32.c +++ b/drivers/crypto/crypto_si32.c @@ -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, diff --git a/drivers/crypto/crypto_smartbond.c b/drivers/crypto/crypto_smartbond.c index 9899f46dd33f5..1cff9f046c4bc 100644 --- a/drivers/crypto/crypto_smartbond.c +++ b/drivers/crypto/crypto_smartbond.c @@ -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) diff --git a/drivers/crypto/crypto_stm32.c b/drivers/crypto/crypto_stm32.c index bd7e05a2ddcdd..c453e3a0e6556 100644 --- a/drivers/crypto/crypto_stm32.c +++ b/drivers/crypto/crypto_stm32.c @@ -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, diff --git a/drivers/crypto/crypto_tc_shim.c b/drivers/crypto/crypto_tc_shim.c index 71616250be05e..7733a96f0708d 100644 --- a/drivers/crypto/crypto_tc_shim.c +++ b/drivers/crypto/crypto_tc_shim.c @@ -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, diff --git a/drivers/ieee802154/ieee802154_cc2520.c b/drivers/ieee802154/ieee802154_cc2520.c index b1c7dd699e735..41d3214885a82 100644 --- a/drivers/ieee802154/ieee802154_cc2520.c +++ b/drivers/ieee802154/ieee802154_cc2520.c @@ -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,