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

clk: qcom: hfpll: use clk_parent_data to specify the parent

This permits extending the driver to other platforms without having to
modify its source code.

Co-developed-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Link: https://lkml.kernel.org/r/20191125135910.679310-6-niklas.cassel@linaro.org
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Jorge Ramirez-Ortiz and committed by
Stephen Boyd
8a7729ab b455dc35

+3 -1
+3 -1
drivers/clk/qcom/hfpll.c
··· 53 53 struct regmap *regmap; 54 54 struct clk_hfpll *h; 55 55 struct clk_init_data init = { 56 - .parent_names = (const char *[]){ "xo" }, 57 56 .num_parents = 1, 58 57 .ops = &clk_ops_hfpll, 59 58 /* ··· 64 65 .flags = CLK_IGNORE_UNUSED, 65 66 }; 66 67 int ret; 68 + struct clk_parent_data pdata = { .index = 0 }; 67 69 68 70 h = devm_kzalloc(dev, sizeof(*h), GFP_KERNEL); 69 71 if (!h) ··· 82 82 if (of_property_read_string_index(dev->of_node, "clock-output-names", 83 83 0, &init.name)) 84 84 return -ENODEV; 85 + 86 + init.parent_data = &pdata; 85 87 86 88 h->d = &hdata; 87 89 h->clkr.hw.init = &init;