#include <linux/errno.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/kmod.h>
#include <linux/slab.h>
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/types.h>
#include "cec-priv.h"
#define CEC_NUM_DEVICES …
#define CEC_NAME …
#define CEC_XFER_TIMEOUT_MS …
int cec_debug;
module_param_named(debug, cec_debug, int, 0644);
MODULE_PARM_DESC(…) …;
static bool debug_phys_addr;
module_param(debug_phys_addr, bool, 0644);
MODULE_PARM_DESC(…) …;
static dev_t cec_dev_t;
static DEFINE_MUTEX(cec_devnode_lock);
static DECLARE_BITMAP(cec_devnode_nums, CEC_NUM_DEVICES);
static struct dentry *top_cec_dir;
#define to_cec_devnode(cd) …
int cec_get_device(struct cec_devnode *devnode)
{ … }
void cec_put_device(struct cec_devnode *devnode)
{ … }
static void cec_devnode_release(struct device *cd)
{ … }
static const struct bus_type cec_bus_type = …;
static int __must_check cec_devnode_register(struct cec_devnode *devnode,
struct module *owner)
{ … }
static void cec_devnode_unregister(struct cec_adapter *adap)
{ … }
#ifdef CONFIG_DEBUG_FS
static ssize_t cec_error_inj_write(struct file *file,
const char __user *ubuf, size_t count, loff_t *ppos)
{ … }
static int cec_error_inj_show(struct seq_file *sf, void *unused)
{ … }
static int cec_error_inj_open(struct inode *inode, struct file *file)
{ … }
static const struct file_operations cec_error_inj_fops = …;
#endif
struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops,
void *priv, const char *name, u32 caps,
u8 available_las)
{ … }
EXPORT_SYMBOL_GPL(…);
int cec_register_adapter(struct cec_adapter *adap,
struct device *parent)
{ … }
EXPORT_SYMBOL_GPL(…);
void cec_unregister_adapter(struct cec_adapter *adap)
{ … }
EXPORT_SYMBOL_GPL(…);
void cec_delete_adapter(struct cec_adapter *adap)
{ … }
EXPORT_SYMBOL_GPL(…);
static int __init cec_devnode_init(void)
{ … }
static void __exit cec_devnode_exit(void)
{ … }
subsys_initcall(cec_devnode_init);
module_exit(…)
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;