treewide: Remove clk_free
This function is a no-op. Remove it.
Signed-off-by: Sean Anderson <seanga2@gmail.com>
Link: https://lore.kernel.org/r/20231216193843.2463779-3-seanga2@gmail.com
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 4bd2d8c..ed6e60b 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -437,8 +437,6 @@
ret = clk_disable(&clk[i]);
if (ret && ret != -ENOSYS)
return ret;
-
- clk_free(&clk[i]);
}
return 0;
@@ -772,22 +770,12 @@
return false;
}
-static void devm_clk_release(struct udevice *dev, void *res)
-{
- clk_free(res);
-}
-
-static int devm_clk_match(struct udevice *dev, void *res, void *data)
-{
- return res == data;
-}
-
struct clk *devm_clk_get(struct udevice *dev, const char *id)
{
int rc;
struct clk *clk;
- clk = devres_alloc(devm_clk_release, sizeof(struct clk), __GFP_ZERO);
+ clk = devm_kzalloc(dev, sizeof(*clk), GFP_KERNEL);
if (unlikely(!clk))
return ERR_PTR(-ENOMEM);
@@ -795,21 +783,9 @@
if (rc)
return ERR_PTR(rc);
- devres_add(dev, clk);
return clk;
}
-void devm_clk_put(struct udevice *dev, struct clk *clk)
-{
- int rc;
-
- if (!clk)
- return;
-
- rc = devres_release(dev, devm_clk_release, devm_clk_match, clk);
- WARN_ON(rc);
-}
-
int clk_uclass_post_probe(struct udevice *dev)
{
/*