diff options
author | Weiyi Lu <weiyi.lu@mediatek.com> | 2019-09-02 12:00:57 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2019-09-17 20:22:49 +0300 |
commit | e4c23e19aa2a611c2068f7c55487d2cbfea690ef (patch) | |
tree | 888003f6b330c012dc74a14c4fc43c4efbcdb078 /drivers/clk/mediatek/clk-gate.c | |
parent | f9e55ac22ce9246c085e1c97ddda93608ce17eaf (diff) | |
download | linux-e4c23e19aa2a611c2068f7c55487d2cbfea690ef.tar.xz |
clk: mediatek: Register clock gate with device
Allow those clocks under a power domain to do the runtime pm operation
by forwarding the struct device pointer from clock provider.
Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Link: https://lkml.kernel.org/r/1567414859-3244-2-git-send-email-weiyi.lu@mediatek.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/mediatek/clk-gate.c')
-rw-r--r-- | drivers/clk/mediatek/clk-gate.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/clk/mediatek/clk-gate.c b/drivers/clk/mediatek/clk-gate.c index 803bf0ae1fd6..a35cf0b22150 100644 --- a/drivers/clk/mediatek/clk-gate.c +++ b/drivers/clk/mediatek/clk-gate.c @@ -150,7 +150,8 @@ struct clk *mtk_clk_register_gate( int sta_ofs, u8 bit, const struct clk_ops *ops, - unsigned long flags) + unsigned long flags, + struct device *dev) { struct mtk_clk_gate *cg; struct clk *clk; @@ -174,7 +175,7 @@ struct clk *mtk_clk_register_gate( cg->hw.init = &init; - clk = clk_register(NULL, &cg->hw); + clk = clk_register(dev, &cg->hw); if (IS_ERR(clk)) kfree(cg); |