Skip to content

Commit 3c0cdd1

Browse files
pdgendtkartben
authored andcommitted
drivers: usb_c: tcpc: Place API into iterable section
Add wrapper DEVICE_API macro to all tcpc_driver_api instances. Signed-off-by: Pieter De Gendt <[email protected]>
1 parent f52fc52 commit 3c0cdd1

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/usb_c/tcpc/ps8xxx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ int ps8xxx_tcpc_set_alert_handler_cb(const struct device *dev, tcpc_alert_handle
543543

544544
/* Functions not assigned to the driver API but used by device */
545545

546-
static const struct tcpc_driver_api ps8xxx_driver_api = {
546+
static DEVICE_API(tcpc, ps8xxx_driver_api) = {
547547
.init = ps8xxx_tcpc_init,
548548
.get_cc = ps8xxx_tcpc_get_cc,
549549
.select_rp_value = ps8xxx_tcpc_select_rp_value,

drivers/usb_c/tcpc/ucpd_numaker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2304,7 +2304,7 @@ int numaker_tcpc_vbus_enable(const struct device *dev, bool enable)
23042304

23052305
/* End of "*_tcpc_vbus_*" functions */
23062306

2307-
static const struct tcpc_driver_api numaker_tcpc_driver_api = {
2307+
static DEVICE_API(tcpc, numaker_tcpc_driver_api) = {
23082308
.init = numaker_tcpc_init_recycle,
23092309
.get_cc = numaker_tcpc_get_cc,
23102310
.select_rp_value = numaker_tcpc_select_rp_value,

drivers/usb_c/tcpc/ucpd_stm32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ static int ucpd_init(const struct device *dev)
14181418
return 0;
14191419
}
14201420

1421-
static const struct tcpc_driver_api driver_api = {
1421+
static DEVICE_API(tcpc, driver_api) = {
14221422
.init = ucpd_init,
14231423
.set_alert_handler_cb = ucpd_set_alert_handler_cb,
14241424
.get_cc = ucpd_get_cc,

0 commit comments

Comments
 (0)