File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -667,12 +667,20 @@ static int ti_pipe3_get_clk(struct ti_pipe3 *phy)
667
667
return 0 ;
668
668
}
669
669
670
+ static void ti_pipe3_put_device (void * _dev )
671
+ {
672
+ struct device * dev = _dev ;
673
+
674
+ put_device (dev );
675
+ }
676
+
670
677
static int ti_pipe3_get_sysctrl (struct ti_pipe3 * phy )
671
678
{
672
679
struct device * dev = phy -> dev ;
673
680
struct device_node * node = dev -> of_node ;
674
681
struct device_node * control_node ;
675
682
struct platform_device * control_pdev ;
683
+ int ret ;
676
684
677
685
phy -> phy_power_syscon = syscon_regmap_lookup_by_phandle (node ,
678
686
"syscon-phy-power" );
@@ -704,6 +712,11 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy)
704
712
}
705
713
706
714
phy -> control_dev = & control_pdev -> dev ;
715
+
716
+ ret = devm_add_action_or_reset (dev , ti_pipe3_put_device ,
717
+ phy -> control_dev );
718
+ if (ret )
719
+ return ret ;
707
720
}
708
721
709
722
if (phy -> mode == PIPE3_MODE_PCIE ) {
You can’t perform that action at this time.
0 commit comments