aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/litmus/ftdev.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/litmus/ftdev.h b/include/litmus/ftdev.h
index efb2a5c9a9b0..348387e9adf9 100644
--- a/include/litmus/ftdev.h
+++ b/include/litmus/ftdev.h
@@ -6,8 +6,6 @@
6#include <linux/mutex.h> 6#include <linux/mutex.h>
7#include <linux/cdev.h> 7#include <linux/cdev.h>
8 8
9#define MAX_FTDEV_MINORS NR_CPUS
10
11#define FTDEV_ENABLE_CMD 0 9#define FTDEV_ENABLE_CMD 0
12#define FTDEV_DISABLE_CMD 1 10#define FTDEV_DISABLE_CMD 1
13 11
@@ -32,11 +30,11 @@ struct ftdev_minor {
32}; 30};
33 31
34struct ftdev { 32struct ftdev {
33 dev_t major;
35 struct cdev cdev; 34 struct cdev cdev;
36 struct class* class; 35 struct class* class;
37 const char* name; 36 const char* name;
38 /* FIXME: don't waste memory, allocate dynamically */ 37 struct ftdev_minor* minor;
39 struct ftdev_minor minor[MAX_FTDEV_MINORS];
40 unsigned int minor_cnt; 38 unsigned int minor_cnt;
41 ftdev_alloc_t alloc; 39 ftdev_alloc_t alloc;
42 ftdev_free_t free; 40 ftdev_free_t free;
@@ -46,7 +44,9 @@ struct ftdev {
46struct ft_buffer* alloc_ft_buffer(unsigned int count, size_t size); 44struct ft_buffer* alloc_ft_buffer(unsigned int count, size_t size);
47void free_ft_buffer(struct ft_buffer* buf); 45void free_ft_buffer(struct ft_buffer* buf);
48 46
49void ftdev_init(struct ftdev* ftdev, struct module* owner, const char* name); 47int ftdev_init( struct ftdev* ftdev, struct module* owner,
48 const int minor_cnt, const char* name);
49void ftdev_exit(struct ftdev* ftdev);
50int register_ftdev(struct ftdev* ftdev); 50int register_ftdev(struct ftdev* ftdev);
51 51
52#endif 52#endif