diff options
Diffstat (limited to 'lib/kunit/device.c')
-rw-r--r-- | lib/kunit/device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/kunit/device.c b/lib/kunit/device.c index e20641559314..abc603730b8e 100644 --- a/lib/kunit/device.c +++ b/lib/kunit/device.c @@ -10,6 +10,7 @@ */ #include <linux/device.h> +#include <linux/dma-mapping.h> #include <kunit/test.h> #include <kunit/device.h> @@ -133,6 +134,9 @@ static struct kunit_device *kunit_device_register_internal(struct kunit *test, return ERR_PTR(err); } + kunit_dev->dev.dma_mask = &kunit_dev->dev.coherent_dma_mask; + kunit_dev->dev.coherent_dma_mask = DMA_BIT_MASK(32); + kunit_add_action(test, device_unregister_wrapper, &kunit_dev->dev); return kunit_dev; |