Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: qcom: clk-spmi-pmic-div: convert to use parent_data

The clk-spmi-pmic-div driver gets the parent name from the first (and
the only) clock parent. So, use parent data, index 0 to setup the clock.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20221210191013.453040-1-dmitry.baryshkov@linaro.org

authored by

Dmitry Baryshkov and committed by
Bjorn Andersson
a622c1dc 7069b91a

+2 -8
+2 -8
drivers/clk/qcom/clk-spmi-pmic-div.c
··· 204 204 struct regmap *regmap; 205 205 struct device *dev = &pdev->dev; 206 206 struct device_node *of_node = dev->of_node; 207 - const char *parent_name; 207 + struct clk_parent_data parent_data = { .index = 0, }; 208 208 int nclks, i, ret, cxo_hz; 209 209 char name[20]; 210 210 u32 start; ··· 246 246 cxo_hz = clk_get_rate(cxo); 247 247 clk_put(cxo); 248 248 249 - parent_name = of_clk_get_parent_name(of_node, 0); 250 - if (!parent_name) { 251 - dev_err(dev, "missing parent clock\n"); 252 - return -ENODEV; 253 - } 254 - 255 249 init.name = name; 256 - init.parent_names = &parent_name; 250 + init.parent_data = &parent_data; 257 251 init.num_parents = 1; 258 252 init.ops = &clk_spmi_pmic_div_ops; 259 253