diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2022-07-04 13:40:39 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2022-07-08 08:56:44 +0300 |
commit | 87686cc845c3be7dea777f1dbf2de0767007cda8 (patch) | |
tree | c1a21bfe9ebad676f452baf132a586041dda4273 /drivers/devfreq/exynos-bus.c | |
parent | 0a43452bb6b1f499b695b123e9fedf4b1a9bbf64 (diff) | |
download | linux-87686cc845c3be7dea777f1dbf2de0767007cda8.tar.xz |
OPP: Make dev_pm_opp_set_regulators() accept NULL terminated list
Make dev_pm_opp_set_regulators() accept a NULL terminated list of names
instead of making the callers keep the two parameters in sync, which
creates an opportunity for bugs to get in.
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Steven Price <steven.price@arm.com> # panfrost
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/devfreq/exynos-bus.c')
-rw-r--r-- | drivers/devfreq/exynos-bus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/devfreq/exynos-bus.c b/drivers/devfreq/exynos-bus.c index e689101abc93..541baff93ee8 100644 --- a/drivers/devfreq/exynos-bus.c +++ b/drivers/devfreq/exynos-bus.c @@ -180,10 +180,10 @@ static int exynos_bus_parent_parse_of(struct device_node *np, { struct device *dev = bus->dev; struct opp_table *opp_table; - const char *vdd = "vdd"; + const char *supplies[] = { "vdd", NULL }; int i, ret, count, size; - opp_table = dev_pm_opp_set_regulators(dev, &vdd, 1); + opp_table = dev_pm_opp_set_regulators(dev, supplies); if (IS_ERR(opp_table)) { ret = PTR_ERR(opp_table); dev_err(dev, "failed to set regulators %d\n", ret); |