From d9e45b579a1ac413f2cbb2631fa757b88d389908 Mon Sep 17 00:00:00 2001 From: Peter Bigot Date: Thu, 29 Oct 2020 10:26:56 -0500 Subject: [PATCH] drivers: regulator: convert to dt device defines Use the devicetree node as the source of object name and other information used when defining the device structure. Signed-off-by: Peter Bigot --- drivers/regulator/regulator_fixed.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/regulator/regulator_fixed.c b/drivers/regulator/regulator_fixed.c index eee99054fde..e1a9511a546 100644 --- a/drivers/regulator/regulator_fixed.c +++ b/drivers/regulator/regulator_fixed.c @@ -386,10 +386,9 @@ static const struct driver_config regulator_##id##_cfg = { \ \ static struct REG_DATA_TAG(id) regulator_##id##_data; \ \ -DEVICE_AND_API_INIT(regulator_##id, DT_INST_LABEL(id), \ - REG_INIT(id), \ - ®ulator_##id##_data, ®ulator_##id##_cfg, \ - POST_KERNEL, CONFIG_REGULATOR_FIXED_INIT_PRIORITY, \ - ®_API(id)); +DEVICE_DT_DEFINE(DT_DRV_INST(id), REG_INIT(id), device_pm_control_nop, \ + ®ulator_##id##_data, ®ulator_##id##_cfg, \ + POST_KERNEL, CONFIG_REGULATOR_FIXED_INIT_PRIORITY, \ + ®_API(id)); DT_INST_FOREACH_STATUS_OKAY(REGULATOR_DEVICE)