summaryrefslogtreecommitdiff
path: root/drivers/thunderbolt/retimer.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-02-16 16:18:54 +0300
committerTakashi Iwai <tiwai@suse.de>2023-02-16 16:18:54 +0300
commit5661706efa200252d0e9fea02421b0a5857808c3 (patch)
treeb6943001feff0af67c206a850be9c536fe3990b4 /drivers/thunderbolt/retimer.c
parent5791c7699ff1b8be24e1e3b2c08b180598d3ba28 (diff)
parent5beb5627a2481aade9aa630b7ebb7f99442321b6 (diff)
downloadlinux-5661706efa200252d0e9fea02421b0a5857808c3.tar.xz
Merge branch 'topic/apple-gmux' into for-next
Pull vga_switcheroo fix for Macs Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'drivers/thunderbolt/retimer.c')
-rw-r--r--drivers/thunderbolt/retimer.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/drivers/thunderbolt/retimer.c b/drivers/thunderbolt/retimer.c
index 81252e31014a..56008eb91e2e 100644
--- a/drivers/thunderbolt/retimer.c
+++ b/drivers/thunderbolt/retimer.c
@@ -427,13 +427,6 @@ int tb_retimer_scan(struct tb_port *port, bool add)
{
u32 status[TB_MAX_RETIMER_INDEX + 1] = {};
int ret, i, last_idx = 0;
- struct usb4_port *usb4;
-
- usb4 = port->usb4;
- if (!usb4)
- return 0;
-
- pm_runtime_get_sync(&usb4->dev);
/*
* Send broadcast RT to make sure retimer indices facing this
@@ -441,7 +434,7 @@ int tb_retimer_scan(struct tb_port *port, bool add)
*/
ret = usb4_port_enumerate_retimers(port);
if (ret)
- goto out;
+ return ret;
/*
* Enable sideband channel for each retimer. We can do this
@@ -471,12 +464,11 @@ int tb_retimer_scan(struct tb_port *port, bool add)
break;
}
- if (!last_idx) {
- ret = 0;
- goto out;
- }
+ if (!last_idx)
+ return 0;
/* Add on-board retimers if they do not exist already */
+ ret = 0;
for (i = 1; i <= last_idx; i++) {
struct tb_retimer *rt;
@@ -490,10 +482,6 @@ int tb_retimer_scan(struct tb_port *port, bool add)
}
}
-out:
- pm_runtime_mark_last_busy(&usb4->dev);
- pm_runtime_put_autosuspend(&usb4->dev);
-
return ret;
}