#define pr_fmt(fmt) …
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/uaccess.h>
#include <linux/idr.h>
#include <linux/mutex.h>
#include <linux/cdev.h>
#include <linux/poll.h>
#include <linux/pps_kernel.h>
#include <linux/slab.h>
#include "kc.h"
static dev_t pps_devt;
static struct class *pps_class;
static DEFINE_MUTEX(pps_idr_lock);
static DEFINE_IDR(pps_idr);
static __poll_t pps_cdev_poll(struct file *file, poll_table *wait)
{ … }
static int pps_cdev_fasync(int fd, struct file *file, int on)
{ … }
static int pps_cdev_pps_fetch(struct pps_device *pps, struct pps_fdata *fdata)
{ … }
static long pps_cdev_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{ … }
#ifdef CONFIG_COMPAT
static long pps_cdev_compat_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{ … }
#else
#define pps_cdev_compat_ioctl …
#endif
static int pps_cdev_open(struct inode *inode, struct file *file)
{ … }
static int pps_cdev_release(struct inode *inode, struct file *file)
{ … }
static const struct file_operations pps_cdev_fops = …;
static void pps_device_destruct(struct device *dev)
{ … }
int pps_register_cdev(struct pps_device *pps)
{ … }
void pps_unregister_cdev(struct pps_device *pps)
{ … }
struct pps_device *pps_lookup_dev(void const *cookie)
{ … }
EXPORT_SYMBOL(…);
static void __exit pps_exit(void)
{ … }
static int __init pps_init(void)
{ … }
subsys_initcall(pps_init);
module_exit(pps_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;