Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e92f678e authored by Mike Tipton's avatar Mike Tipton Committed by Gerrit - the friendly Code Review server
Browse files

clk: qcom: Add qcom_clk_hw_get_name()



The existing clk_hw_get_name() only works after the clock has been
registered with the framework since it relies on hw->core->name and
hw->core is NULL pre-registration. hw->init->name can be used
pre-registration, but this doesn't work post-registration since the
framework sets hw->init to NULL.

Provide qcom_clk_hw_get_name(), which can be called in both pre and
post-registration contexts.

Change-Id: I334e545f5112961b7ab6879daca55c70236338d6
Signed-off-by: default avatarMike Tipton <mdtipton@codeaurora.org>
parent 58fb72ee
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -84,4 +84,9 @@ int qcom_cc_runtime_init(struct platform_device *pdev,
int qcom_cc_runtime_suspend(struct device *dev);
int qcom_cc_runtime_resume(struct device *dev);

static inline const char *qcom_clk_hw_get_name(const struct clk_hw *hw)
{
	return hw->init ? hw->init->name : clk_hw_get_name(hw);
}

#endif