drivers: ps2: Place API into iterable section

Add wrapper DEVICE_API macro to all ps2_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2024-11-28 19:30:08 +01:00 committed by Fabio Baltieri
commit 6e81a3e490
2 changed files with 2 additions and 2 deletions

View file

@ -337,7 +337,7 @@ static void ps2_xec_isr(const struct device *dev)
regs->CTRL = MCHP_PS2_CTRL_EN; regs->CTRL = MCHP_PS2_CTRL_EN;
} }
static const struct ps2_driver_api ps2_xec_driver_api = { static DEVICE_API(ps2, ps2_xec_driver_api) = {
.config = ps2_xec_configure, .config = ps2_xec_configure,
.read = NULL, .read = NULL,
.write = ps2_xec_write, .write = ps2_xec_write,

View file

@ -96,7 +96,7 @@ static int ps2_npcx_channel_init(const struct device *dev)
return 0; return 0;
} }
static const struct ps2_driver_api ps2_channel_npcx_driver_api = { static DEVICE_API(ps2, ps2_channel_npcx_driver_api) = {
.config = ps2_npcx_ch_configure, .config = ps2_npcx_ch_configure,
.read = NULL, .read = NULL,
.write = ps2_npcx_ch_write, .write = ps2_npcx_ch_write,