#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <kunit/test.h>
#include <kunit/device.h>
#include <kunit/resource.h>
#include "device-impl.h"
KUNIT_DEFINE_ACTION_WRAPPER(device_unregister_wrapper, device_unregister, struct device *);
KUNIT_DEFINE_ACTION_WRAPPER(driver_unregister_wrapper, driver_unregister, struct device_driver *);
static struct device *kunit_bus_device;
struct kunit_device { … };
#define to_kunit_device(d) …
static const struct bus_type kunit_bus_type = …;
int kunit_bus_init(void)
{ … }
void kunit_bus_shutdown(void)
{ … }
static void kunit_device_release(struct device *d)
{ … }
struct device_driver *kunit_driver_create(struct kunit *test, const char *name)
{ … }
EXPORT_SYMBOL_GPL(…);
static struct kunit_device *kunit_device_register_internal(struct kunit *test,
const char *name,
const struct device_driver *drv)
{ … }
struct device *kunit_device_register_with_driver(struct kunit *test,
const char *name,
const struct device_driver *drv)
{ … }
EXPORT_SYMBOL_GPL(…);
struct device *kunit_device_register(struct kunit *test, const char *name)
{ … }
EXPORT_SYMBOL_GPL(…);
void kunit_device_unregister(struct kunit *test, struct device *dev)
{ … }
EXPORT_SYMBOL_GPL(…);