summaryrefslogtreecommitdiffstats
path: root/drivers/thunderbolt/path.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2019-03-06 18:21:08 +0200
committerMika Westerberg <mika.westerberg@linux.intel.com>2019-04-18 11:18:53 +0300
commitab9f31cfa89ad700f83bfaf30dc8703c4f609d0f (patch)
tree104db45ceedcdde73392316891db65bd8c17edb3 /drivers/thunderbolt/path.c
parent4f807e47ee9a75747d042a8eacf398f436da9452 (diff)
downloadlinux-ab9f31cfa89ad700f83bfaf30dc8703c4f609d0f.tar.bz2
thunderbolt: Do not tear down tunnels when driver is unloaded
Now that we have capability to discover existing tunnels during driver load there is no point tearing down tunnels when the driver gets unloaded. Instead we can just leave them running. If user disconnects devices while there is no Thunderbolt driver loaded, tunneled protocol hotplug happens and is handled by the corresponding driver (pciehp in case of PCIe tunnel, GFX driver in case of DP tunnel). Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/path.c')
-rw-r--r--drivers/thunderbolt/path.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/thunderbolt/path.c b/drivers/thunderbolt/path.c
index 670a12e60d66..3fc92881a197 100644
--- a/drivers/thunderbolt/path.c
+++ b/drivers/thunderbolt/path.c
@@ -304,17 +304,15 @@ err:
}
/**
- * tb_path_free() - free a deactivated path
+ * tb_path_free() - free a path
+ * @path: Path to free
+ *
+ * Frees a path. The path does not need to be deactivated.
*/
void tb_path_free(struct tb_path *path)
{
int i;
- if (path->activated) {
- tb_WARN(path->tb, "trying to free an activated path\n")
- return;
- }
-
for (i = 0; i < path->path_length; i++) {
const struct tb_path_hop *hop = &path->hops[i];