[PATCH RESEND 4/5] clk: promote clk_dev_ops to linux/clk-provider.h
Yang Xiwen via B4 Relay
devnull+forbidden405.outlook.com at kernel.org
Thu Aug 17 19:04:03 CEST 2023
From: Yang Xiwen <forbidden405 at outlook.com>
So that it can be used by others.
Signed-off-by: Yang Xiwen <forbidden405 at outlook.com>
---
drivers/clk/clk-uclass.c | 5 -----
include/linux/clk-provider.h | 5 +++++
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index dc3e9d6a26..5cc80e5e39 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -25,11 +25,6 @@
#include <linux/clk-provider.h>
#include <linux/err.h>
-static inline const struct clk_ops *clk_dev_ops(struct udevice *dev)
-{
- return (const struct clk_ops *)dev->driver->ops;
-}
-
struct clk *dev_get_clk_ptr(struct udevice *dev)
{
return (struct clk *)dev_get_uclass_priv(dev);
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 801404480b..dfafb4cc9d 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -21,6 +21,11 @@ static inline void clk_dm(ulong id, struct clk *clk)
clk->id = id;
}
+static inline const struct clk_ops *clk_dev_ops(struct udevice *dev)
+{
+ return (const struct clk_ops *)dev->driver->ops;
+}
+
/*
* flags used across common struct clk. these flags should only affect the
* top-level framework. custom flags for dealing with hardware specifics
--
2.34.1
More information about the U-Boot
mailing list