To ease debugging of the incorrect clock configurations, add the name of clock controller to the "invalid index" error message. Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> --- drivers/clk/qcom/common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c index 75f09e6e057e..7dcf818e1dd9 100644 --- a/drivers/clk/qcom/common.c +++ b/drivers/clk/qcom/common.c @@ -19,6 +19,7 @@ struct qcom_cc { struct qcom_reset_controller reset; + struct device *dev; struct clk_regmap **rclks; size_t num_rclks; }; @@ -227,7 +228,7 @@ static struct clk_hw *qcom_cc_clk_hw_get(struct of_phandle_args *clkspec, unsigned int idx = clkspec->args[0]; if (idx >= cc->num_rclks) { - pr_err("%s: invalid index %u\n", __func__, idx); + dev_err(cc->dev, "%s: requested invalid clock index %u\n", __func__, idx); return ERR_PTR(-EINVAL); } @@ -251,6 +252,8 @@ int qcom_cc_really_probe(struct platform_device *pdev, if (!cc) return -ENOMEM; + cc->dev = dev; + reset = &cc->reset; reset->rcdev.of_node = dev->of_node; reset->rcdev.ops = &qcom_reset_ops; -- 2.39.2