Skip to content

Commit 345f7f1

Browse files
pdgendtkartben
authored andcommitted
drivers: watchdog: Place API into iterable section
Add wrapper DEVICE_API macro to all wdt_driver_api instances. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent d76d711 commit 345f7f1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+47
-45
lines changed

drivers/watchdog/wdt_ambiq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ static int wdt_ambiq_init(const struct device *dev)
166166
return 0;
167167
}
168168

169-
static const struct wdt_driver_api wdt_ambiq_driver_api = {
169+
static DEVICE_API(wdt, wdt_ambiq_driver_api) = {
170170
.setup = wdt_ambiq_setup,
171171
.disable = wdt_ambiq_disable,
172172
.install_timeout = wdt_ambiq_install_timeout,

drivers/watchdog/wdt_andes_atcwdt200.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ static int wdt_atcwdt200_feed(const struct device *dev, int channel_id)
299299
return 0;
300300
}
301301

302-
static const struct wdt_driver_api wdt_atcwdt200_api = {
302+
static DEVICE_API(wdt, wdt_atcwdt200_api) = {
303303
.setup = wdt_atcwdt200_setup,
304304
.disable = wdt_atcwdt200_disable,
305305
.install_timeout = wdt_atcwdt200_install_timeout,

drivers/watchdog/wdt_cc13xx_cc26xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ static int wdt_cc13xx_cc26xx_init(const struct device *dev)
213213
return wdt_cc13xx_cc26xx_setup(dev, options);
214214
}
215215

216-
static const struct wdt_driver_api wdt_cc13xx_cc26xx_api = {
216+
static DEVICE_API(wdt, wdt_cc13xx_cc26xx_api) = {
217217
.setup = wdt_cc13xx_cc26xx_setup,
218218
.disable = wdt_cc13xx_cc26xx_disable,
219219
.install_timeout = wdt_cc13xx_cc26xx_install_timeout,

drivers/watchdog/wdt_cc32xx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static int wdt_cc32xx_init(const struct device *dev)
161161
return rv;
162162
}
163163

164-
static const struct wdt_driver_api wdt_cc32xx_api = {
164+
static DEVICE_API(wdt, wdt_cc32xx_api) = {
165165
.setup = wdt_cc32xx_setup,
166166
.disable = wdt_cc32xx_disable,
167167
.install_timeout = wdt_cc32xx_install_timeout,

drivers/watchdog/wdt_cmsdk_apb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static int wdog_cmsdk_apb_feed(const struct device *dev, int channel_id)
152152
return 0;
153153
}
154154

155-
static const struct wdt_driver_api wdog_cmsdk_apb_api = {
155+
static DEVICE_API(wdt, wdog_cmsdk_apb_api) = {
156156
.setup = wdog_cmsdk_apb_setup,
157157
.disable = wdog_cmsdk_apb_disable,
158158
.install_timeout = wdog_cmsdk_apb_install_timeout,

drivers/watchdog/wdt_counter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static int wdt_counter_feed(const struct device *dev, int chan_id)
149149
return timeout_set(dev, chan_id, true);
150150
}
151151

152-
static const struct wdt_driver_api wdt_counter_driver_api = {
152+
static DEVICE_API(wdt, wdt_counter_driver_api) = {
153153
.setup = wdt_counter_setup,
154154
.disable = wdt_counter_disable,
155155
.install_timeout = wdt_counter_install_timeout,

drivers/watchdog/wdt_dw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ int dw_wdt_disable(const struct device *dev)
148148
return ret;
149149
}
150150

151-
static const struct wdt_driver_api dw_wdt_api = {
151+
static DEVICE_API(wdt, dw_wdt_api) = {
152152
.setup = dw_wdt_setup,
153153
.disable = dw_wdt_disable,
154154
.install_timeout = dw_wdt_install_timeout,

drivers/watchdog/wdt_ene_kb1200.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ static void wdt_kb1200_isr(const struct device *dev)
143143
}
144144
}
145145

146-
static const struct wdt_driver_api wdt_kb1200_api = {
146+
static DEVICE_API(wdt, wdt_kb1200_api) = {
147147
.setup = wdt_kb1200_setup,
148148
.disable = wdt_kb1200_disable,
149149
.install_timeout = wdt_kb1200_install_timeout,

drivers/watchdog/wdt_esp32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ static int wdt_esp32_init(const struct device *dev)
185185
return 0;
186186
}
187187

188-
static const struct wdt_driver_api wdt_api = {
188+
static DEVICE_API(wdt, wdt_api) = {
189189
.setup = wdt_esp32_set_config,
190190
.disable = wdt_esp32_disable,
191191
.install_timeout = wdt_esp32_install_timeout,

drivers/watchdog/wdt_fwdgt_gd32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ static int gd32_fwdgt_feed(const struct device *dev, int channel_id)
146146
return 0;
147147
}
148148

149-
static const struct wdt_driver_api fwdgt_gd32_api = {
149+
static DEVICE_API(wdt, fwdgt_gd32_api) = {
150150
.setup = gd32_fwdgt_setup,
151151
.disable = gd32_fwdgt_disable,
152152
.install_timeout = gd32_fwdgt_install_timeout,

0 commit comments

Comments
 (0)