Skip to content

Commit 812347f

Browse files
yishai1999fabiobaltieri
authored andcommitted
drivers: spi: Place API into iterable section
Add wrapper DEVICE_API macro to all spi_driver_api instances. Signed-off-by: Yishai Jaffe <[email protected]>
1 parent 458b288 commit 812347f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+52
-52
lines changed

drivers/spi/spi_ambiq_bleif.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static int spi_ambiq_release(const struct device *dev, const struct spi_config *
159159
return 0;
160160
}
161161

162-
static struct spi_driver_api spi_ambiq_driver_api = {
162+
static DEVICE_API(spi, spi_ambiq_driver_api) = {
163163
.transceive = spi_ambiq_transceive,
164164
#ifdef CONFIG_SPI_RTIO
165165
.iodev_submit = spi_rtio_iodev_default_submit,

drivers/spi/spi_ambiq_spic.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ static int spi_ambiq_release(const struct device *dev, const struct spi_config *
417417
return 0;
418418
}
419419

420-
static const struct spi_driver_api spi_ambiq_driver_api = {
420+
static DEVICE_API(spi, spi_ambiq_driver_api) = {
421421
.transceive = spi_ambiq_transceive,
422422
#ifdef CONFIG_SPI_RTIO
423423
.iodev_submit = spi_rtio_iodev_default_submit,

drivers/spi/spi_ambiq_spid.c

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

328-
static const struct spi_driver_api spi_ambiq_driver_api = {
328+
static DEVICE_API(spi, spi_ambiq_driver_api) = {
329329
.transceive = spi_ambiq_transceive,
330330
.release = spi_ambiq_release,
331331
};

drivers/spi/spi_andes_atcspi200.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,7 @@ int spi_atcspi200_init(const struct device *dev)
739739
return 0;
740740
}
741741

742-
static const struct spi_driver_api spi_atcspi200_api = {
742+
static DEVICE_API(spi, spi_atcspi200_api) = {
743743
.transceive = spi_atcspi200_transceive,
744744
#ifdef CONFIG_SPI_ASYNC
745745
.transceive_async = spi_atcspi200_transceive_async,

drivers/spi/spi_b91.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ static int spi_b91_release(const struct device *dev,
453453
}
454454

455455
/* SPI driver APIs structure */
456-
static const struct spi_driver_api spi_b91_api = {
456+
static DEVICE_API(spi, spi_b91_api) = {
457457
.transceive = spi_b91_transceive,
458458
.release = spi_b91_release,
459459
#ifdef CONFIG_SPI_ASYNC

drivers/spi/spi_b_renesas_ra8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ static int ra_spi_b_release(const struct device *dev, const struct spi_config *c
400400
return 0;
401401
}
402402

403-
static const struct spi_driver_api ra_spi_driver_api = {.transceive = ra_spi_b_transceive,
403+
static DEVICE_API(spi, ra_spi_driver_api) = {.transceive = ra_spi_b_transceive,
404404
#ifdef CONFIG_SPI_ASYNC
405405
.transceive_async =
406406
ra_spi_b_transceive_async,

drivers/spi/spi_bitbang.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ int spi_bitbang_release(const struct device *dev,
249249
return 0;
250250
}
251251

252-
static const struct spi_driver_api spi_bitbang_api = {
252+
static DEVICE_API(spi, spi_bitbang_api) = {
253253
.transceive = spi_bitbang_transceive,
254254
.release = spi_bitbang_release,
255255
#ifdef CONFIG_SPI_ASYNC

drivers/spi/spi_cc13xx_cc26xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ static int spi_cc13xx_cc26xx_pm_action(const struct device *dev,
235235
#endif /* CONFIG_PM_DEVICE */
236236

237237

238-
static const struct spi_driver_api spi_cc13xx_cc26xx_driver_api = {
238+
static DEVICE_API(spi, spi_cc13xx_cc26xx_driver_api) = {
239239
.transceive = spi_cc13xx_cc26xx_transceive,
240240
.release = spi_cc13xx_cc26xx_release,
241241
#ifdef CONFIG_SPI_RTIO

drivers/spi/spi_dw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ void spi_dw_isr(const struct device *dev)
525525
completed(dev, error);
526526
}
527527

528-
static const struct spi_driver_api dw_spi_api = {
528+
static DEVICE_API(spi, dw_spi_api) = {
529529
.transceive = spi_dw_transceive,
530530
#ifdef CONFIG_SPI_ASYNC
531531
.transceive_async = spi_dw_transceive_async,

drivers/spi/spi_emul.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ int spi_emul_register(const struct device *dev, struct spi_emul *emul)
130130

131131
/* Device instantiation */
132132

133-
static const struct spi_driver_api spi_emul_api = {
133+
static DEVICE_API(spi, spi_emul_api) = {
134134
.transceive = spi_emul_io,
135135
#ifdef CONFIG_SPI_RTIO
136136
.iodev_submit = spi_rtio_iodev_default_submit,

0 commit comments

Comments
 (0)