diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2019-03-06 18:21:08 +0200 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2019-04-18 11:18:53 +0300 |
commit | ab9f31cfa89ad700f83bfaf30dc8703c4f609d0f (patch) | |
tree | 104db45ceedcdde73392316891db65bd8c17edb3 /drivers/thunderbolt/path.c | |
parent | 4f807e47ee9a75747d042a8eacf398f436da9452 (diff) |
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.c | 10 |
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]; |