@@ -2243,7 +2243,6 @@ static int phy_pipe_clk_register(struct qmp_combo *qmp, struct device_node *np)
2243
2243
struct clk_fixed_rate * fixed = & qmp -> pipe_clk_fixed ;
2244
2244
struct clk_init_data init = { };
2245
2245
char name [64 ];
2246
- int ret ;
2247
2246
2248
2247
snprintf (name , sizeof (name ), "%s::pipe_clk" , dev_name (qmp -> dev ));
2249
2248
init .name = name ;
@@ -2253,19 +2252,7 @@ static int phy_pipe_clk_register(struct qmp_combo *qmp, struct device_node *np)
2253
2252
fixed -> fixed_rate = 125000000 ;
2254
2253
fixed -> hw .init = & init ;
2255
2254
2256
- ret = devm_clk_hw_register (qmp -> dev , & fixed -> hw );
2257
- if (ret )
2258
- return ret ;
2259
-
2260
- ret = of_clk_add_hw_provider (np , of_clk_hw_simple_get , & fixed -> hw );
2261
- if (ret )
2262
- return ret ;
2263
-
2264
- /*
2265
- * Roll a devm action because the clock provider is the child node, but
2266
- * the child node is not actually a device.
2267
- */
2268
- return devm_add_action_or_reset (qmp -> dev , phy_clk_release_provider , np );
2255
+ return devm_clk_hw_register (qmp -> dev , & fixed -> hw );
2269
2256
}
2270
2257
2271
2258
/*
@@ -2436,15 +2423,7 @@ static int phy_dp_clks_register(struct qmp_combo *qmp, struct device_node *np)
2436
2423
if (ret )
2437
2424
return ret ;
2438
2425
2439
- ret = of_clk_add_hw_provider (np , qcom_qmp_dp_clks_hw_get , qmp );
2440
- if (ret )
2441
- return ret ;
2442
-
2443
- /*
2444
- * Roll a devm action because the clock provider is the child node, but
2445
- * the child node is not actually a device.
2446
- */
2447
- return devm_add_action_or_reset (qmp -> dev , phy_clk_release_provider , np );
2426
+ return 0 ;
2448
2427
}
2449
2428
2450
2429
static int qmp_combo_register_clocks (struct qmp_combo * qmp , struct device_node * usb_np ,
@@ -2460,7 +2439,24 @@ static int qmp_combo_register_clocks(struct qmp_combo *qmp, struct device_node *
2460
2439
if (ret )
2461
2440
return ret ;
2462
2441
2463
- return 0 ;
2442
+ ret = of_clk_add_hw_provider (usb_np , of_clk_hw_simple_get ,
2443
+ & qmp -> pipe_clk_fixed .hw );
2444
+ if (ret )
2445
+ return ret ;
2446
+
2447
+ /*
2448
+ * Roll a devm action because the clock provider is the child node, but
2449
+ * the child node is not actually a device.
2450
+ */
2451
+ ret = devm_add_action_or_reset (qmp -> dev , phy_clk_release_provider , usb_np );
2452
+ if (ret )
2453
+ return ret ;
2454
+
2455
+ ret = of_clk_add_hw_provider (dp_np , qcom_qmp_dp_clks_hw_get , qmp );
2456
+ if (ret )
2457
+ return ret ;
2458
+
2459
+ return devm_add_action_or_reset (qmp -> dev , phy_clk_release_provider , dp_np );
2464
2460
}
2465
2461
2466
2462
static int qmp_combo_parse_dt_lecacy_dp (struct qmp_combo * qmp , struct device_node * np )
0 commit comments