@@ -3664,7 +3664,7 @@ static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np)
3664
3664
struct clk_init_data init = { };
3665
3665
int ret ;
3666
3666
3667
- ret = of_property_read_string (np , "clock-output-names" , & init .name );
3667
+ ret = of_property_read_string_index (np , "clock-output-names" , 0 , & init .name );
3668
3668
if (ret ) {
3669
3669
dev_err (qmp -> dev , "%pOFn: No clock-output-names\n" , np );
3670
3670
return ret ;
@@ -3683,11 +3683,18 @@ static int phy_pipe_clk_register(struct qmp_pcie *qmp, struct device_node *np)
3683
3683
3684
3684
fixed -> hw .init = & init ;
3685
3685
3686
- ret = devm_clk_hw_register (qmp -> dev , & fixed -> hw );
3686
+ return devm_clk_hw_register (qmp -> dev , & fixed -> hw );
3687
+ }
3688
+
3689
+ static int qmp_pcie_register_clocks (struct qmp_pcie * qmp , struct device_node * np )
3690
+ {
3691
+ int ret ;
3692
+
3693
+ ret = phy_pipe_clk_register (qmp , np );
3687
3694
if (ret )
3688
3695
return ret ;
3689
3696
3690
- ret = of_clk_add_hw_provider (np , of_clk_hw_simple_get , & fixed -> hw );
3697
+ ret = of_clk_add_hw_provider (np , of_clk_hw_simple_get , & qmp -> pipe_clk_fixed . hw );
3691
3698
if (ret )
3692
3699
return ret ;
3693
3700
@@ -3899,7 +3906,7 @@ static int qmp_pcie_probe(struct platform_device *pdev)
3899
3906
if (ret )
3900
3907
goto err_node_put ;
3901
3908
3902
- ret = phy_pipe_clk_register (qmp , np );
3909
+ ret = qmp_pcie_register_clocks (qmp , np );
3903
3910
if (ret )
3904
3911
goto err_node_put ;
3905
3912
0 commit comments