#undef DEBUG
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/stm.h>
#include <uapi/linux/stm.h>
static ssize_t notrace
dummy_stm_packet(struct stm_data *stm_data, unsigned int master,
unsigned int channel, unsigned int packet, unsigned int flags,
unsigned int size, const unsigned char *payload)
{ … }
#define DUMMY_STM_MAX …
static struct stm_data dummy_stm[DUMMY_STM_MAX];
static int nr_dummies = …;
module_param(nr_dummies, int, 0400);
static unsigned int fail_mode;
module_param(fail_mode, int, 0600);
static unsigned int master_min;
module_param(master_min, int, 0400);
static unsigned int master_max = …;
module_param(master_max, int, 0400);
static unsigned int nr_channels = …;
module_param(nr_channels, int, 0400);
static int dummy_stm_link(struct stm_data *data, unsigned int master,
unsigned int channel)
{ … }
static int dummy_stm_init(void)
{ … }
static void dummy_stm_exit(void)
{ … }
module_init(…) …;
module_exit(dummy_stm_exit);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;