#include <linux/io.h>
#include <linux/miscdevice.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/of_reserved_mem.h>
#include <linux/platform_device.h>
#define DRIVER_NAME …
struct open_dice_drvdata { … };
static inline struct open_dice_drvdata *to_open_dice_drvdata(struct file *filp)
{ … }
static int open_dice_wipe(struct open_dice_drvdata *drvdata)
{ … }
static ssize_t open_dice_read(struct file *filp, char __user *ptr, size_t len,
loff_t *off)
{ … }
static ssize_t open_dice_write(struct file *filp, const char __user *ptr,
size_t len, loff_t *off)
{ … }
static int open_dice_mmap(struct file *filp, struct vm_area_struct *vma)
{ … }
static const struct file_operations open_dice_fops = …;
static int __init open_dice_probe(struct platform_device *pdev)
{ … }
static void open_dice_remove(struct platform_device *pdev)
{ … }
static const struct of_device_id open_dice_of_match[] = …;
static struct platform_driver open_dice_driver = …;
static int __init open_dice_init(void)
{ … }
static void __exit open_dice_exit(void)
{ … }
module_init(…) …;
module_exit(open_dice_exit);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;