diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-01-31 08:57:19 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-02-01 09:01:34 +0100 |
commit | 2e07ceb4b8ad9e0013af12c7191e100c3da35f06 (patch) | |
tree | 1d01d5133d63375be5bcc6a8198fb2f12cfe2803 | |
parent | 917d7d7a94f7dc1a086270981a356a50e633839a (diff) | |
download | barebox-2e07ceb4b8ad9e0013af12c7191e100c3da35f06.tar.gz barebox-2e07ceb4b8ad9e0013af12c7191e100c3da35f06.tar.xz |
clk: define clk_hw_register
Save users the hassle of opencoding by providing a wrapper with the same
Linux semantics: same arguments and return type.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220131075725.1873026-7-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | include/linux/clk.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/clk.h b/include/linux/clk.h index 390bead99a..9f2069dc9e 100644 --- a/include/linux/clk.h +++ b/include/linux/clk.h @@ -683,6 +683,11 @@ int clk_parent_set_rate(struct clk_hw *hw, unsigned long rate, int bclk_register(struct clk *clk); struct clk *clk_register(struct device_d *dev, struct clk_hw *hw); +static inline int clk_hw_register(struct device_d *dev, struct clk_hw *hw) +{ + return PTR_ERR_OR_ZERO(clk_register(dev, hw)); +} + struct clk *clk_lookup(const char *name); void clk_dump(int verbose); |