summaryrefslogtreecommitdiff
path: root/drivers/thunderbolt/domain.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2020-08-24 12:46:52 +0300
committerMika Westerberg <mika.westerberg@linux.intel.com>2020-09-16 14:57:46 +0300
commit2c6ea4e2cefe2e86af782a5b8e1070f4d434f2f2 (patch)
tree7120f7cb51581c70ed207203cccb28145740a666 /drivers/thunderbolt/domain.c
parent884e4d576fdf6780a896bc9f7a2fe73fce5aa66a (diff)
thunderbolt: Allow KUnit tests to be built also when CONFIG_USB4=m
This adds a bit more build coverage for the tests even though these are not expected to be enabled by normal users and distros. In order to make this working we need to open-code kunit_test_suite() and call the relevant functions directly in the driver init/exit hook. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/domain.c')
-rw-r--r--drivers/thunderbolt/domain.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/thunderbolt/domain.c b/drivers/thunderbolt/domain.c
index a0182bf5a5f8..f0de94f7acbf 100644
--- a/drivers/thunderbolt/domain.c
+++ b/drivers/thunderbolt/domain.c
@@ -827,6 +827,8 @@ int tb_domain_init(void)
{
int ret;
+ tb_test_init();
+
tb_debugfs_init();
ret = tb_xdomain_init();
if (ret)
@@ -841,6 +843,7 @@ err_xdomain:
tb_xdomain_exit();
err_debugfs:
tb_debugfs_exit();
+ tb_test_exit();
return ret;
}
@@ -852,4 +855,5 @@ void tb_domain_exit(void)
tb_nvm_exit();
tb_xdomain_exit();
tb_debugfs_exit();
+ tb_test_exit();
}