diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2023-12-19 09:02:39 +0300 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2023-12-27 10:57:30 +0300 |
commit | ba367479c7ad0b870461024cd5ae7a1ea6e1e3db (patch) | |
tree | 8621037b0d79adccc0842f65ebeec1f6fe923737 /drivers | |
parent | 19cc8b1819a40410c50a3efab6cf27b73298deb5 (diff) | |
download | linux-ba367479c7ad0b870461024cd5ae7a1ea6e1e3db.tar.xz |
OPP: The level field is always of unsigned int type
By mistake, dev_pm_opp_find_level_floor() used the level parameter as
unsigned long instead of unsigned int. Fix it.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/opp/core.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/opp/core.c b/drivers/opp/core.c index c022d548067d..49b429984bdb 100644 --- a/drivers/opp/core.c +++ b/drivers/opp/core.c @@ -842,9 +842,14 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_find_level_ceil); * use. */ struct dev_pm_opp *dev_pm_opp_find_level_floor(struct device *dev, - unsigned long *level) + unsigned int *level) { - return _find_key_floor(dev, level, 0, true, _read_level, NULL); + unsigned long temp = *level; + struct dev_pm_opp *opp; + + opp = _find_key_floor(dev, &temp, 0, true, _read_level, NULL); + *level = temp; + return opp; } EXPORT_SYMBOL_GPL(dev_pm_opp_find_level_floor); |