[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210831135450.26070-3-digetx@gmail.com>
Date: Tue, 31 Aug 2021 16:54:44 +0300
From: Dmitry Osipenko <digetx@...il.com>
To: Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
Ulf Hansson <ulf.hansson@...aro.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Kevin Hilman <khilman@...nel.org>,
Viresh Kumar <vireshk@...nel.org>,
Stephen Boyd <sboyd@...nel.org>, Nishanth Menon <nm@...com>
Cc: linux-kernel@...r.kernel.org, linux-tegra@...r.kernel.org,
linux-pm@...r.kernel.org
Subject: [PATCH v10 2/8] opp: Allow dev_pm_opp_set_clkname() to replace released clock
The opp_table->clk is set to error once clock is released by
dev_pm_opp_put_clkname(). This doesn't allow to set clock again,
until OPP table is re-created from scratch. Check opp_table->clk
for both NULL and ERR_PTR to allow the clock's replacement.
Signed-off-by: Dmitry Osipenko <digetx@...il.com>
---
drivers/opp/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/opp/core.c b/drivers/opp/core.c
index dde8a5cc948c..602e502d092e 100644
--- a/drivers/opp/core.c
+++ b/drivers/opp/core.c
@@ -2146,7 +2146,7 @@ struct opp_table *dev_pm_opp_set_clkname(struct device *dev, const char *name)
}
/* clk shouldn't be initialized at this point */
- if (WARN_ON(opp_table->clk)) {
+ if (WARN_ON(!IS_ERR_OR_NULL(opp_table->clk))) {
ret = -EBUSY;
goto err;
}
--
2.32.0
Powered by blists - more mailing lists