drivers: gpio: Wrap driver instances in device API macro

Use the device API macro to place the driver API instance into an iterable
section.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2025-02-12 09:26:06 +01:00 committed by Benjamin Cabé
parent f13643ebbd
commit 61bfb4dba4
2 changed files with 2 additions and 2 deletions

View File

@ -256,7 +256,7 @@ static int gpio_cc23x0_init(const struct device *dev)
return 0;
}
static const struct gpio_driver_api gpio_cc23x0_driver_api = {
static DEVICE_API(gpio, gpio_cc23x0_driver_api) = {
.pin_configure = gpio_cc23x0_config,
#ifdef CONFIG_GPIO_GET_CONFIG
.pin_get_config = gpio_cc23x0_get_config,

View File

@ -612,7 +612,7 @@ static int mfxstm32l152_init(const struct device *dev)
return ret;
}
static const struct gpio_driver_api mfxstm32l152_drv_api = {
static DEVICE_API(gpio, mfxstm32l152_drv_api) = {
.pin_configure = mfxstm32l152_configure,
.port_get_raw = mfxstm32l152_port_get_raw,
.port_set_masked_raw = NULL,