Skip to content

Commit 458b288

Browse files
yishai1999fabiobaltieri
authored andcommitted
drivers: led_strip: Place API into iterable section
Add wrapper DEVICE_API macro to all led_strip_driver_api instances. Signed-off-by: Yishai Jaffe <[email protected]>
1 parent 589be4e commit 458b288

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

drivers/led_strip/apa102.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ static int apa102_init(const struct device *dev)
9292
return 0;
9393
}
9494

95-
static const struct led_strip_driver_api apa102_api = {
95+
static DEVICE_API(led_strip, apa102_api) = {
9696
.update_rgb = apa102_update_rgb,
9797
.length = apa102_length,
9898
};

drivers/led_strip/lpd880x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ static const struct lpd880x_config lpd880x_config = {
150150
.length = DT_INST_PROP(0, chain_length),
151151
};
152152

153-
static const struct led_strip_driver_api lpd880x_strip_api = {
153+
static DEVICE_API(led_strip, lpd880x_strip_api) = {
154154
.update_rgb = lpd880x_strip_update_rgb,
155155
.update_channels = lpd880x_strip_update_channels,
156156
.length = lpd880x_strip_length,

drivers/led_strip/tlc5971.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ static int tlc5971_init(const struct device *dev)
322322
return 0;
323323
}
324324

325-
static const struct led_strip_driver_api tlc5971_api = {
325+
static DEVICE_API(led_strip, tlc5971_api) = {
326326
.update_rgb = tlc5971_update_rgb,
327327
.length = tlc5971_length,
328328
};

drivers/led_strip/tlc59731.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ static size_t tlc59731_length(const struct device *dev)
139139
return config->length;
140140
}
141141

142-
static const struct led_strip_driver_api tlc59731_gpio_api = {
142+
static DEVICE_API(led_strip, tlc59731_gpio_api) = {
143143
.update_rgb = tlc59731_gpio_update_rgb,
144144
.length = tlc59731_length,
145145
};

drivers/led_strip/ws2812_gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ static size_t ws2812_gpio_length(const struct device *dev)
172172
return config->length;
173173
}
174174

175-
static const struct led_strip_driver_api ws2812_gpio_api = {
175+
static DEVICE_API(led_strip, ws2812_gpio_api) = {
176176
.update_rgb = ws2812_gpio_update_rgb,
177177
.length = ws2812_gpio_length,
178178
};

drivers/led_strip/ws2812_i2s.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static int ws2812_i2s_init(const struct device *dev)
202202
return 0;
203203
}
204204

205-
static const struct led_strip_driver_api ws2812_i2s_api = {
205+
static DEVICE_API(led_strip, ws2812_i2s_api) = {
206206
.update_rgb = ws2812_strip_update_rgb,
207207
.length = ws2812_strip_length,
208208
};

drivers/led_strip/ws2812_rpi_pico_pio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ static size_t ws2812_led_strip_length(const struct device *dev)
116116
return config->length;
117117
}
118118

119-
static const struct led_strip_driver_api ws2812_led_strip_api = {
119+
static DEVICE_API(led_strip, ws2812_led_strip_api) = {
120120
.update_rgb = ws2812_led_strip_update_rgb,
121121
.length = ws2812_led_strip_length,
122122
};

drivers/led_strip/ws2812_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static int ws2812_spi_init(const struct device *dev)
169169
return 0;
170170
}
171171

172-
static const struct led_strip_driver_api ws2812_spi_api = {
172+
static DEVICE_API(led_strip, ws2812_spi_api) = {
173173
.update_rgb = ws2812_strip_update_rgb,
174174
.length = ws2812_strip_length,
175175
};

0 commit comments

Comments
 (0)