summaryrefslogtreecommitdiff
path: root/drivers/clk
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2021-12-22 12:11:11 -0500
committerSean Anderson <seanga2@gmail.com>2022-02-24 23:58:13 -0500
commit14cacb019c2d2a97e8407fad08b164bc67def395 (patch)
treebe2d2cb1a2314d7abf4459827d4aa9d8089d4653 /drivers/clk
parent011bbfbb304fc6554163df34fbe0d50b88ace968 (diff)
downloadu-boot-14cacb019c2d2a97e8407fad08b164bc67def395.tar.gz
u-boot-14cacb019c2d2a97e8407fad08b164bc67def395.tar.bz2
u-boot-14cacb019c2d2a97e8407fad08b164bc67def395.zip
clk: Inline clk_get_*_optional
The optional varients of clk_get_* functions are just simple wrappers. Reduce code size a bit by inlining them. On platforms where it is not used (most of them), it will not be compiled in any more. On platforms where they are used, the inlined branch should not cause any significant growth. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/r/20211222171114.3091780-3-seanga2@gmail.com
Diffstat (limited to 'drivers/clk')
-rw-r--r--drivers/clk/clk-uclass.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 9aa51895b3..fca4b8321a 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -432,18 +432,6 @@ int clk_get_by_name_nodev(ofnode node, const char *name, struct clk *clk)
return clk_get_by_index_nodev(node, index, clk);
}
-int clk_get_by_name_nodev_optional(ofnode node, const char *name,
- struct clk *clk)
-{
- int ret;
-
- ret = clk_get_by_name_nodev(node, name, clk);
- if (ret == -ENODATA)
- return 0;
-
- return ret;
-}
-
int clk_release_all(struct clk *clk, int count)
{
int i, ret;
@@ -824,16 +812,6 @@ struct clk *devm_clk_get(struct udevice *dev, const char *id)
return clk;
}
-struct clk *devm_clk_get_optional(struct udevice *dev, const char *id)
-{
- struct clk *clk = devm_clk_get(dev, id);
-
- if (PTR_ERR(clk) == -ENODATA)
- return NULL;
-
- return clk;
-}
-
void devm_clk_put(struct udevice *dev, struct clk *clk)
{
int rc;