Browse Source

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>
pull/85684/head
Pieter De Gendt 5 months ago committed by Benjamin Cabé
parent
commit
61bfb4dba4
  1. 2
      drivers/gpio/gpio_cc23x0.c
  2. 2
      drivers/gpio/gpio_mfxstm32l152.c

2
drivers/gpio/gpio_cc23x0.c

@ -256,7 +256,7 @@ static int gpio_cc23x0_init(const struct device *dev)
return 0; 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, .pin_configure = gpio_cc23x0_config,
#ifdef CONFIG_GPIO_GET_CONFIG #ifdef CONFIG_GPIO_GET_CONFIG
.pin_get_config = gpio_cc23x0_get_config, .pin_get_config = gpio_cc23x0_get_config,

2
drivers/gpio/gpio_mfxstm32l152.c

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

Loading…
Cancel
Save