@@ -287,7 +287,6 @@ REGULATOR
CLOCK
devm_clk_get()
- devm_clk_put()
PINCTRL
devm_pinctrl_get()
@@ -43,13 +43,3 @@ static int devm_clk_match(struct device *dev, void *res, void *data)
}
return *c == data;
}
-
-void devm_clk_put(struct device *dev, struct clk *clk)
-{
- int ret;
-
- ret = devres_release(dev, devm_clk_release, devm_clk_match, clk);
-
- WARN_ON(ret);
-}
-EXPORT_SYMBOL(devm_clk_put);
@@ -154,7 +154,9 @@ struct clk *clk_get(struct device *dev, const char *id);
* devm_clk_get should not be called from within interrupt context.
*
* The clock will automatically be freed when the device is unbound
- * from the bus.
+ * from the bus. Note there is deliberately no devm_clk_put function as a
+ * driver usally keeps the reference to its clocks during the complete driver
+ * live time.
*/
struct clk *devm_clk_get(struct device *dev, const char *id);
@@ -205,19 +207,6 @@ unsigned long clk_get_rate(struct clk *clk);
*/
void clk_put(struct clk *clk);
-/**
- * devm_clk_put - "free" a managed clock source
- * @dev: device used to acuqire the clock
- * @clk: clock source acquired with devm_clk_get()
- *
- * Note: drivers must ensure that all clk_enable calls made on this
- * clock source are balanced by clk_disable calls prior to calling
- * this function.
- *
- * clk_put should not be called from within interrupt context.
- */
-void devm_clk_put(struct device *dev, struct clk *clk);
-
/*
* The remaining APIs are optional for machine class support.
*/
@@ -290,8 +279,6 @@ static inline struct clk *devm_clk_get(struct device *dev, const char *id)
static inline void clk_put(struct clk *clk) {}
-static inline void devm_clk_put(struct device *dev, struct clk *clk) {}
-
static inline int clk_enable(struct clk *clk)
{
return 0;
devm_clk_put isn't really necessary as a driver usually keeps the reference during its lifetime and there are no in-tree users. So drop it. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> --- The "no in-tree users" part of the commit log isn't true yet, as there is no agreed-on patch for sound/soc/kirkwood/kirkwood-i2s.c yet and the other patches in this thread are not applied/acked yet. --- Documentation/driver-model/devres.txt | 1 - drivers/clk/clk-devres.c | 10 ---------- include/linux/clk.h | 19 +++---------------- 3 files changed, 3 insertions(+), 27 deletions(-)