Skip to content

Commit

Permalink
drivers: regulator: parent: Place API into iterable section
Browse files Browse the repository at this point in the history
Add wrapper DEVICE_API macro to all regulator_parent_driver_api instances.

Signed-off-by: Pieter De Gendt <[email protected]>
  • Loading branch information
pdgendt committed Nov 30, 2024
1 parent 7fdf15b commit 45c2822
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/regulator/regulator_fake.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ DEFINE_FAKE_VALUE_FUNC(int, regulator_parent_fake_dvs_state_set,
DEFINE_FAKE_VALUE_FUNC(int, regulator_parent_fake_ship_mode,
const struct device *);

static struct regulator_parent_driver_api parent_api = {
static DEVICE_API(regulator_parent, parent_api) = {
.dvs_state_set = regulator_parent_fake_dvs_state_set,
.ship_mode = regulator_parent_fake_ship_mode,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/regulator_max20335.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ static int regulator_max20335_common_init(const struct device *dev)
return 0;
}

static const struct regulator_parent_driver_api parent_api = {
static DEVICE_API(regulator_parent, parent_api) = {
.ship_mode = regulator_max20335_power_off,
};

Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/regulator_npm1300.c
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ int regulator_npm1300_ship_mode(const struct device *dev)
return mfd_npm1300_reg_write(pconfig->mfd, SHIP_BASE, SHIP_OFFSET_SHIP, 1U);
}

static const struct regulator_parent_driver_api parent_api = {
static DEVICE_API(regulator_parent, parent_api) = {
.dvs_state_set = regulator_npm1300_dvs_state_set,
.ship_mode = regulator_npm1300_ship_mode,
};
Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/regulator_pca9420.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ int regulator_pca9420_dvs_state_set(const struct device *dev,
return 0;
}

static const struct regulator_parent_driver_api parent_api = {
static DEVICE_API(regulator_parent, parent_api) = {
.dvs_state_set = regulator_pca9420_dvs_state_set,
};

Expand Down

0 comments on commit 45c2822

Please sign in to comment.