mirror of
https://github.com/torvalds/linux.git
synced 2026-04-26 18:42:25 -04:00
drm/ttm/tests: Use an init function from the helpers lib
Add a new helper function that also initializes the device. Use it in ttm_tt test suite and delete the local definition. Signed-off-by: Karolina Stolarek <karolina.stolarek@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Reviewed-by: Somalapuram, Amaranath <asomalap@amd.com> Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/235f110c1bdd2da7fac62ec03d177a5160dba1d5.1718192625.git.karolina.stolarek@intel.com
This commit is contained in:
committed by
Arunpravin Paneer Selvam
parent
dc50165601
commit
f7ed0a7e42
@@ -158,6 +158,20 @@ int ttm_test_devices_init(struct kunit *test)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ttm_test_devices_init);
|
||||
|
||||
int ttm_test_devices_all_init(struct kunit *test)
|
||||
{
|
||||
struct ttm_test_devices *priv;
|
||||
|
||||
priv = kunit_kzalloc(test, sizeof(*priv), GFP_KERNEL);
|
||||
KUNIT_ASSERT_NOT_NULL(test, priv);
|
||||
|
||||
priv = ttm_test_devices_all(test);
|
||||
test->priv = priv;
|
||||
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ttm_test_devices_all_init);
|
||||
|
||||
void ttm_test_devices_fini(struct kunit *test)
|
||||
{
|
||||
ttm_test_devices_put(test, test->priv);
|
||||
|
||||
Reference in New Issue
Block a user