Skip to content

Commit f3cb1c9

Browse files
committed
drivers: clock_control: Convert DEVICE_AND_API_INIT to DEVICE_DEFINE
Convert driver(s) to DEVICE_DEFINE instead of DEVICE_AND_API_INIT so we can deprecate DEVICE_AND_API_INIT in the future. Signed-off-by: Kumar Gala <[email protected]>
1 parent e1c47a9 commit f3cb1c9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

drivers/clock_control/beetle_clock_control.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,9 @@ static const struct beetle_clock_control_cfg_t beetle_cc_cfg = {
242242
* @brief Clock Control device init
243243
*
244244
*/
245-
DEVICE_AND_API_INIT(clock_control_beetle, CONFIG_ARM_CLOCK_CONTROL_DEV_NAME,
245+
DEVICE_DEFINE(clock_control_beetle, CONFIG_ARM_CLOCK_CONTROL_DEV_NAME,
246246
&beetle_clock_control_init,
247+
device_pm_control_nop,
247248
NULL, &beetle_cc_cfg,
248249
PRE_KERNEL_1,
249250
CONFIG_CLOCK_CONTROL_BEETLE_DEVICE_INIT_PRIORITY,

drivers/clock_control/clock_control_npcx.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,9 @@ const struct npcx_pcc_config pcc_config = {
160160
.base_pmc = DT_INST_REG_ADDR_BY_NAME(0, pmc),
161161
};
162162

163-
DEVICE_AND_API_INIT(npcx_cdcg, NPCX_CLK_CTRL_NAME,
163+
DEVICE_DEFINE(npcx_cdcg, NPCX_CLK_CTRL_NAME,
164164
&npcx_clock_control_init,
165+
device_pm_control_nop,
165166
NULL, &pcc_config,
166167
PRE_KERNEL_1,
167168
CONFIG_KERNEL_INIT_PRIORITY_OBJECTS,

0 commit comments

Comments
 (0)