samples: userspace: prod_consumer: Update API to use DEVICE_API macro

Update the sample driver API to put it in a linker section using the
DEVICE_API macro.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
This commit is contained in:
Pieter De Gendt 2025-01-23 13:19:29 +01:00 committed by Benjamin Cabé
commit ff7948010f

View file

@ -65,7 +65,7 @@ static int sample_driver_foo_state_set(const struct device *dev, bool active)
return 0;
}
static struct sample_driver_api sample_driver_foo_api = {
static DEVICE_API(sample, sample_driver_foo_api) = {
.write = sample_driver_foo_write,
.set_callback = sample_driver_foo_set_callback,
.state_set = sample_driver_foo_state_set