Re: [PATCH v9 1/8] opp: Add dev_pm_opp_from_clk_rate()

Dmitry Osipenko
2021-08-27T01:42:15Z

27.08.2021 04:34, Dmitry Osipenko пишет:
> diff --git a/drivers/opp/core.c b/drivers/opp/core.c
> index 04b4691a8aac..fae5267f5218 100644
> --- a/drivers/opp/core.c
> +++ b/drivers/opp/core.c
> @@ -939,7 +939,8 @@ static int _set_required_opps(struct device *dev,
> return ret;
> }
>
> -static void _find_current_opp(struct device *dev, struct opp_table *opp_table)
> +static struct dev_pm_opp *
> +_find_current_opp(struct device *dev, struct opp_table *opp_table)
> {
> struct dev_pm_opp *opp = ERR_PTR(-ENODEV);
> unsigned long freq;
> @@ -961,7 +962,7 @@ static void _find_current_opp(struct device *dev, struct opp_table *opp_table)
> mutex_unlock(&opp_table->lock);
> }
>
> - opp_table->current_opp = opp;
> + return opp;
> }
>
> static int _disable_opp_table(struct device *dev, struct opp_table *opp_table)
> @@ -1003,7 +1004,7 @@ static int _set_opp(struct device *dev, struct opp_table *opp_table,
>
> /* Find the currently set OPP if we don't know already */
> if (unlikely(!opp_table->current_opp))
> - _find_current_opp(dev, opp_table);
> + opp_table->current_opp = _find_current_opp(dev, opp_table);
>
> old_opp = opp_table->current_opp;
>
> @@ -2931,3 +2932,38 @@ int dev_pm_opp_sync_regulators(struct device *dev)
> return ret;
> }

Please skip these lines. I missed to remove them during rebase and
haven't noticed until now.