drivers: regulator: pmic: constify device config access
`const` was missing from one device config access. Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This commit is contained in:
parent
50720eb0cb
commit
1aeec129fc
1 changed files with 3 additions and 1 deletions
|
@ -89,7 +89,9 @@ static int regulator_modify_register(const struct regulator_config *conf,
|
||||||
*/
|
*/
|
||||||
int regulator_count_voltages(const struct device *dev)
|
int regulator_count_voltages(const struct device *dev)
|
||||||
{
|
{
|
||||||
return ((struct regulator_config *)dev->config)->num_voltages;
|
const struct regulator_config *config = dev->config;
|
||||||
|
|
||||||
|
return config->num_voltages;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue