Skip to content

Commit 45be45d

Browse files
pdgendtkartben
authored andcommitted
drivers: crypto: Place API into iterable section
Add wrapper DEVICE_API macro to all crypto_driver_api instances. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent 3775e19 commit 45be45d

14 files changed

+14
-14
lines changed

drivers/crypto/crypto_ataes132a.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ static const struct ataes132a_device_config ataes132a_config = {
875875
.i2c = I2C_DT_SPEC_INST_GET(0),
876876
};
877877

878-
static struct crypto_driver_api crypto_enc_funcs = {
878+
static DEVICE_API(crypto, crypto_enc_funcs) = {
879879
.cipher_begin_session = ataes132a_session_setup,
880880
.cipher_free_session = ataes132a_session_free,
881881
.cipher_async_callback_set = NULL,

drivers/crypto/crypto_intel_sha.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ static int intel_sha_device_hw_caps(const struct device *dev)
325325
return (CAP_SEPARATE_IO_BUFS | CAP_SYNC_OPS);
326326
}
327327

328-
static struct crypto_driver_api hash_enc_funcs = {
328+
static DEVICE_API(crypto, hash_enc_funcs) = {
329329
.hash_begin_session = intel_sha_device_set_hash_type,
330330
.hash_free_session = intel_sha_device_free,
331331
.hash_async_callback_set = NULL,

drivers/crypto/crypto_it8xxx2_sha.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ static int it8xxx2_sha_init(const struct device *dev)
215215
return 0;
216216
}
217217

218-
static const struct crypto_driver_api it8xxx2_crypto_api = {
218+
static DEVICE_API(crypto, it8xxx2_crypto_api) = {
219219
.hash_begin_session = it8xxx2_hash_begin_session,
220220
.hash_free_session = it8xxx2_hash_session_free,
221221
.query_hw_caps = it8xxx2_query_hw_caps,

drivers/crypto/crypto_it8xxx2_sha_v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ static int it8xxx2_sha_init(const struct device *dev)
340340
return 0;
341341
}
342342

343-
static const struct crypto_driver_api it8xxx2_crypto_api = {
343+
static DEVICE_API(crypto, it8xxx2_crypto_api) = {
344344
.hash_begin_session = it8xxx2_hash_begin_session,
345345
.hash_free_session = it8xxx2_hash_session_free,
346346
.query_hw_caps = it8xxx2_query_hw_caps,

drivers/crypto/crypto_mchp_xec_symcr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ static int xec_symcr_init(const struct device *dev)
514514
return ret;
515515
}
516516

517-
static const struct crypto_driver_api xec_symcr_api = {
517+
static DEVICE_API(crypto, xec_symcr_api) = {
518518
.query_hw_caps = xec_symcr_query_hw_caps,
519519
.hash_begin_session = xec_symcr_hash_session_begin,
520520
.hash_free_session = xec_symcr_hash_session_free,

drivers/crypto/crypto_mcux_dcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ static int crypto_dcp_init(const struct device *dev)
331331
return 0;
332332
}
333333

334-
static const struct crypto_driver_api crypto_dcp_api = {
334+
static DEVICE_API(crypto, crypto_dcp_api) = {
335335
.query_hw_caps = crypto_dcp_query_hw_caps,
336336
.cipher_begin_session = crypto_dcp_cipher_begin_session,
337337
.cipher_free_session = crypto_dcp_cipher_free_session,

drivers/crypto/crypto_mtls_shim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,7 @@ static int mtls_query_caps(const struct device *dev)
599599
return MTLS_SUPPORT;
600600
}
601601

602-
static struct crypto_driver_api mtls_crypto_funcs = {
602+
static DEVICE_API(crypto, mtls_crypto_funcs) = {
603603
.cipher_begin_session = mtls_session_setup,
604604
.cipher_free_session = mtls_session_free,
605605
.cipher_async_callback_set = NULL,

drivers/crypto/crypto_npcx_sha.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static int npcx_hash_init(const struct device *dev)
202202
return 0;
203203
}
204204

205-
static const struct crypto_driver_api npcx_crypto_api = {
205+
static DEVICE_API(crypto, npcx_crypto_api) = {
206206
.hash_begin_session = npcx_hash_session_setup,
207207
.hash_free_session = npcx_hash_session_free,
208208
.query_hw_caps = npcx_query_caps,

drivers/crypto/crypto_nrf_ecb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ static int nrf_ecb_session_free(const struct device *dev,
132132
return 0;
133133
}
134134

135-
static const struct crypto_driver_api crypto_enc_funcs = {
135+
static DEVICE_API(crypto, crypto_enc_funcs) = {
136136
.cipher_begin_session = nrf_ecb_session_setup,
137137
.cipher_free_session = nrf_ecb_session_free,
138138
.cipher_async_callback_set = NULL,

drivers/crypto/crypto_si32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ static int crypto_si32_free_session(const struct device *dev, struct cipher_ctx
11941194
}
11951195

11961196
/* AES only, no support for hashing */
1197-
static const struct crypto_driver_api crypto_si32_api = {
1197+
static DEVICE_API(crypto, crypto_si32_api) = {
11981198
.query_hw_caps = crypto_si32_query_hw_caps,
11991199
.cipher_begin_session = crypto_si32_begin_session,
12001200
.cipher_free_session = crypto_si32_free_session,

0 commit comments

Comments
 (0)