#include <linux/cdev.h>
#include <linux/device.h>
#include <linux/fs.h>
#include "hfi.h"
#include "device.h"
static char *hfi1_devnode(const struct device *dev, umode_t *mode)
{ … }
static const struct class class = …;
static char *hfi1_user_devnode(const struct device *dev, umode_t *mode)
{ … }
static const struct class user_class = …;
static dev_t hfi1_dev;
int hfi1_cdev_init(int minor, const char *name,
const struct file_operations *fops,
struct cdev *cdev, struct device **devp,
bool user_accessible,
struct kobject *parent)
{ … }
void hfi1_cdev_cleanup(struct cdev *cdev, struct device **devp)
{ … }
static const char *hfi1_class_name = …;
const char *class_name(void)
{ … }
int __init dev_init(void)
{ … }
void dev_cleanup(void)
{ … }