Skip to content

Commit bad2bee

Browse files
pdgendtfabiobaltieri
authored andcommitted
drivers: espi: Place API into iterable section
Add wrapper DEVICE_API macro to all espi_driver_api instances. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent c896dd3 commit bad2bee

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

drivers/espi/espi_it8xxx2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ static void espi_it8xxx2_flash_init(const struct device *dev)
13361336
/* eSPI driver registration */
13371337
static int espi_it8xxx2_init(const struct device *dev);
13381338

1339-
static const struct espi_driver_api espi_it8xxx2_driver_api = {
1339+
static DEVICE_API(espi, espi_it8xxx2_driver_api) = {
13401340
.config = espi_it8xxx2_configure,
13411341
.get_channel_status = espi_it8xxx2_channel_ready,
13421342
.send_vwire = espi_it8xxx2_send_vwire,

drivers/espi/espi_mchp_xec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ static void espi_xec_periph_isr(const struct device *dev)
14301430

14311431
static int espi_xec_init(const struct device *dev);
14321432

1433-
static const struct espi_driver_api espi_xec_driver_api = {
1433+
static DEVICE_API(espi, espi_xec_driver_api) = {
14341434
.config = espi_xec_configure,
14351435
.get_channel_status = espi_xec_channel_ready,
14361436
.send_vwire = espi_xec_send_vwire,

drivers/espi/espi_mchp_xec_v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,7 +1250,7 @@ const struct espi_vw_isr m2s_vwires_isr[] = {
12501250

12511251
static int espi_xec_init(const struct device *dev);
12521252

1253-
static const struct espi_driver_api espi_xec_driver_api = {
1253+
static DEVICE_API(espi, espi_xec_driver_api) = {
12541254
.config = espi_xec_configure,
12551255
.get_channel_status = espi_xec_channel_ready,
12561256
.send_vwire = espi_xec_send_vwire,

drivers/espi/espi_npcx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ void npcx_espi_disable_interrupts(const struct device *dev)
13471347
/* eSPI driver registration */
13481348
static int espi_npcx_init(const struct device *dev);
13491349

1350-
static const struct espi_driver_api espi_npcx_driver_api = {
1350+
static DEVICE_API(espi, espi_npcx_driver_api) = {
13511351
.config = espi_npcx_configure,
13521352
.get_channel_status = espi_npcx_channel_ready,
13531353
.send_vwire = espi_npcx_send_vwire,

0 commit comments

Comments
 (0)