Skip to content

Commit 90ccb28

Browse files
pdgendtkartben
authored andcommitted
drivers: entropy: Place API into iterable section
Add wrapper DEVICE_API macro to all entropy_driver_api instances. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent a519150 commit 90ccb28

22 files changed

+22
-22
lines changed

drivers/entropy/entropy_b91_trng.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static int entropy_b91_trng_get_entropy_isr(const struct device *dev,
5959
}
6060

6161
/* Entropy driver APIs structure */
62-
static const struct entropy_driver_api entropy_b91_trng_api = {
62+
static DEVICE_API(entropy, entropy_b91_trng_api) = {
6363
.get_entropy = entropy_b91_trng_get_entropy,
6464
.get_entropy_isr = entropy_b91_trng_get_entropy_isr
6565
};

drivers/entropy/entropy_bt_hci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ static int entropy_bt_get_entropy(const struct device *dev,
3737
}
3838

3939
/* HCI commands cannot be run from an interrupt context */
40-
static const struct entropy_driver_api entropy_bt_api = {
40+
static DEVICE_API(entropy, entropy_bt_api) = {
4141
.get_entropy = entropy_bt_get_entropy,
4242
.get_entropy_isr = NULL
4343
};

drivers/entropy/entropy_cc13xx_cc26xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ static int entropy_cc13xx_cc26xx_init(const struct device *dev)
334334
return 0;
335335
}
336336

337-
static const struct entropy_driver_api entropy_cc13xx_cc26xx_driver_api = {
337+
static DEVICE_API(entropy, entropy_cc13xx_cc26xx_driver_api) = {
338338
.get_entropy = entropy_cc13xx_cc26xx_get_entropy,
339339
.get_entropy_isr = entropy_cc13xx_cc26xx_get_entropy_isr,
340340
};

drivers/entropy/entropy_esp32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static int entropy_esp32_init(const struct device *dev)
8888
return ret;
8989
}
9090

91-
static const struct entropy_driver_api entropy_esp32_api_funcs = {
91+
static DEVICE_API(entropy, entropy_esp32_api_funcs) = {
9292
.get_entropy = entropy_esp32_get_entropy
9393
};
9494

drivers/entropy/entropy_gecko_se.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ static int entropy_gecko_se_init(const struct device *dev)
4949
return 0;
5050
}
5151

52-
static const struct entropy_driver_api entropy_gecko_se_api_funcs = {
52+
static DEVICE_API(entropy, entropy_gecko_se_api_funcs) = {
5353
.get_entropy = entropy_gecko_se_get_entropy,
5454
};
5555

drivers/entropy/entropy_gecko_trng.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ static int entropy_gecko_trng_init(const struct device *dev)
148148
return 0;
149149
}
150150

151-
static struct entropy_driver_api entropy_gecko_trng_api_funcs = {
151+
static DEVICE_API(entropy, entropy_gecko_trng_api_funcs) = {
152152
.get_entropy = entropy_gecko_trng_get_entropy,
153153
.get_entropy_isr = entropy_gecko_trng_get_entropy_isr
154154
};

drivers/entropy/entropy_litex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static int entropy_prbs_get_entropy(const struct device *dev, uint8_t *buffer,
3434
return 0;
3535
}
3636

37-
static const struct entropy_driver_api entropy_prbs_api = {
37+
static DEVICE_API(entropy, entropy_prbs_api) = {
3838
.get_entropy = entropy_prbs_get_entropy
3939
};
4040

drivers/entropy/entropy_max32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static int api_get_entropy_isr(const struct device *dev, uint8_t *buf, uint16_t
6565
return ret;
6666
}
6767

68-
static const struct entropy_driver_api entropy_max32_api = {.get_entropy = api_get_entropy,
68+
static DEVICE_API(entropy, entropy_max32_api) = {.get_entropy = api_get_entropy,
6969
.get_entropy_isr = api_get_entropy_isr};
7070

7171
static int entropy_max32_init(const struct device *dev)

drivers/entropy/entropy_mcux_caam.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static int entropy_mcux_caam_get_entropy(const struct device *dev,
6666
return 0;
6767
}
6868

69-
static const struct entropy_driver_api entropy_mcux_caam_api_funcs = {
69+
static DEVICE_API(entropy, entropy_mcux_caam_api_funcs) = {
7070
.get_entropy = entropy_mcux_caam_get_entropy
7171
};
7272

drivers/entropy/entropy_mcux_rng.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ static int entropy_mcux_rng_get_entropy(const struct device *dev,
3030
return 0;
3131
}
3232

33-
static const struct entropy_driver_api entropy_mcux_rng_api_funcs = {
33+
static DEVICE_API(entropy, entropy_mcux_rng_api_funcs) = {
3434
.get_entropy = entropy_mcux_rng_get_entropy
3535
};
3636

0 commit comments

Comments
 (0)