Commit 8a7729ab authored by Jorge Ramirez-Ortiz's avatar Jorge Ramirez-Ortiz Committed by Stephen Boyd

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: default avatarNiklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: default avatarNiklas Cassel <niklas.cassel@linaro.org>
Signed-off-by: default avatarJorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
Link: https://lkml.kernel.org/r/20191125135910.679310-6-niklas.cassel@linaro.orgSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent b455dc35
...@@ -53,7 +53,6 @@ static int qcom_hfpll_probe(struct platform_device *pdev) ...@@ -53,7 +53,6 @@ static int qcom_hfpll_probe(struct platform_device *pdev)
struct regmap *regmap; struct regmap *regmap;
struct clk_hfpll *h; struct clk_hfpll *h;
struct clk_init_data init = { struct clk_init_data init = {
.parent_names = (const char *[]){ "xo" },
.num_parents = 1, .num_parents = 1,
.ops = &clk_ops_hfpll, .ops = &clk_ops_hfpll,
/* /*
...@@ -65,6 +64,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev) ...@@ -65,6 +64,7 @@ static int qcom_hfpll_probe(struct platform_device *pdev)
.flags = CLK_IGNORE_UNUSED, .flags = CLK_IGNORE_UNUSED,
}; };
int ret; int ret;
struct clk_parent_data pdata = { .index = 0 };
h = devm_kzalloc(dev, sizeof(*h), GFP_KERNEL); h = devm_kzalloc(dev, sizeof(*h), GFP_KERNEL);
if (!h) if (!h)
...@@ -83,6 +83,8 @@ static int qcom_hfpll_probe(struct platform_device *pdev) ...@@ -83,6 +83,8 @@ static int qcom_hfpll_probe(struct platform_device *pdev)
0, &init.name)) 0, &init.name))
return -ENODEV; return -ENODEV;
init.parent_data = &pdata;
h->d = &hdata; h->d = &hdata;
h->clkr.hw.init = &init; h->clkr.hw.init = &init;
spin_lock_init(&h->lock); spin_lock_init(&h->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment