-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsimple.h
More file actions
33 lines (29 loc) · 840 Bytes
/
simple.h
File metadata and controls
33 lines (29 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/kernel.h> /* printk() */
#include <linux/slab.h> /* kmalloc() */
#include <linux/fs.h> /* everything... */
#include <linux/errno.h> /* error codes */
#include <linux/types.h> /* size_t */
#include <linux/mm.h>
#include <linux/kdev_t.h>
#include <asm/page.h>
#include <linux/cdev.h>
#include <linux/uaccess.h>
#include <linux/device.h>
#include <linux/string.h>
#include <linux/kfifo.h>
#include <linux/semaphore.h>
#include <linux/mutex.h>
#include <linux/wait.h>
#include <linux/sched.h>
#define MAX_SIMPLE_DEV 2
#define DEVCREATEERR 1001
#define DEVADDERR 1002
#define KB 1024
#define MB (1024*KB)
/* FIXME : Unable to allocate more than 4MB buffer with kfifo_alloc()
* Why?
*/
unsigned long int FIFO_SIZE = (4*MB);