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)
667667 return 0 ;
668668}
669669
670+ static void ti_pipe3_put_device (void * _dev )
671+ {
672+ struct device * dev = _dev ;
673+
674+ put_device (dev );
675+ }
676+
670677static int ti_pipe3_get_sysctrl (struct ti_pipe3 * phy )
671678{
672679 struct device * dev = phy -> dev ;
673680 struct device_node * node = dev -> of_node ;
674681 struct device_node * control_node ;
675682 struct platform_device * control_pdev ;
683+ int ret ;
676684
677685 phy -> phy_power_syscon = syscon_regmap_lookup_by_phandle (node ,
678686 "syscon-phy-power" );
@@ -704,6 +712,11 @@ static int ti_pipe3_get_sysctrl(struct ti_pipe3 *phy)
704712 }
705713
706714 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 ;
707720 }
708721
709722 if (phy -> mode == PIPE3_MODE_PCIE ) {
You can’t perform that action at this time.
0 commit comments