mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
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
This commit is contained in:
committed by
Bjorn Andersson
parent
7069b91ac2
commit
a622c1dc84
@@ -204,7 +204,7 @@ static int spmi_pmic_clkdiv_probe(struct platform_device *pdev)
|
|||||||
struct regmap *regmap;
|
struct regmap *regmap;
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct device_node *of_node = dev->of_node;
|
struct device_node *of_node = dev->of_node;
|
||||||
const char *parent_name;
|
struct clk_parent_data parent_data = { .index = 0, };
|
||||||
int nclks, i, ret, cxo_hz;
|
int nclks, i, ret, cxo_hz;
|
||||||
char name[20];
|
char name[20];
|
||||||
u32 start;
|
u32 start;
|
||||||
@@ -246,14 +246,8 @@ static int spmi_pmic_clkdiv_probe(struct platform_device *pdev)
|
|||||||
cxo_hz = clk_get_rate(cxo);
|
cxo_hz = clk_get_rate(cxo);
|
||||||
clk_put(cxo);
|
clk_put(cxo);
|
||||||
|
|
||||||
parent_name = of_clk_get_parent_name(of_node, 0);
|
|
||||||
if (!parent_name) {
|
|
||||||
dev_err(dev, "missing parent clock\n");
|
|
||||||
return -ENODEV;
|
|
||||||
}
|
|
||||||
|
|
||||||
init.name = name;
|
init.name = name;
|
||||||
init.parent_names = &parent_name;
|
init.parent_data = &parent_data;
|
||||||
init.num_parents = 1;
|
init.num_parents = 1;
|
||||||
init.ops = &clk_spmi_pmic_div_ops;
|
init.ops = &clk_spmi_pmic_div_ops;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user