thunderbolt: Allow KUnit tests to be built also when CONFIG_USB4=m
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 24 Aug 2020 09:46:52 +0000 (12:46 +0300)
committerMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 16 Sep 2020 11:57:46 +0000 (14:57 +0300)
commit2c6ea4e2cefe2e86af782a5b8e1070f4d434f2f2
tree7120f7cb51581c70ed207203cccb28145740a666
parent884e4d576fdf6780a896bc9f7a2fe73fce5aa66a
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>
drivers/thunderbolt/Kconfig
drivers/thunderbolt/Makefile
drivers/thunderbolt/domain.c
drivers/thunderbolt/tb.h
drivers/thunderbolt/test.c