From 61bfb4dba4f0ca23122fbed973ddc9864ef5993d Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Wed, 12 Feb 2025 09:26:06 +0100 Subject: [PATCH] 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 --- drivers/gpio/gpio_cc23x0.c | 2 +- drivers/gpio/gpio_mfxstm32l152.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio_cc23x0.c b/drivers/gpio/gpio_cc23x0.c index 643766e255d..b39c7b3ec9d 100644 --- a/drivers/gpio/gpio_cc23x0.c +++ b/drivers/gpio/gpio_cc23x0.c @@ -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, diff --git a/drivers/gpio/gpio_mfxstm32l152.c b/drivers/gpio/gpio_mfxstm32l152.c index ede0740df8d..bf2e57c138a 100644 --- a/drivers/gpio/gpio_mfxstm32l152.c +++ b/drivers/gpio/gpio_mfxstm32l152.c @@ -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,