diff options
Diffstat (limited to 'include/litmus/ftdev.h')
-rw-r--r-- | include/litmus/ftdev.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/litmus/ftdev.h b/include/litmus/ftdev.h index 348387e9adf9..0b959874dd70 100644 --- a/include/litmus/ftdev.h +++ b/include/litmus/ftdev.h | |||
@@ -16,7 +16,8 @@ typedef int (*ftdev_can_open_t)(struct ftdev* dev, unsigned int buf_no); | |||
16 | /* return 0 on success, otherwise -$REASON */ | 16 | /* return 0 on success, otherwise -$REASON */ |
17 | typedef int (*ftdev_alloc_t)(struct ftdev* dev, unsigned int buf_no); | 17 | typedef int (*ftdev_alloc_t)(struct ftdev* dev, unsigned int buf_no); |
18 | typedef void (*ftdev_free_t)(struct ftdev* dev, unsigned int buf_no); | 18 | typedef void (*ftdev_free_t)(struct ftdev* dev, unsigned int buf_no); |
19 | 19 | /* Let devices handle writes from userspace. No synchronization provided. */ | |
20 | typedef ssize_t (*ftdev_write_t)(struct ft_buffer* buf, size_t len, const char __user *from); | ||
20 | 21 | ||
21 | struct ftdev_event; | 22 | struct ftdev_event; |
22 | 23 | ||
@@ -27,6 +28,7 @@ struct ftdev_minor { | |||
27 | /* FIXME: filter for authorized events */ | 28 | /* FIXME: filter for authorized events */ |
28 | struct ftdev_event* events; | 29 | struct ftdev_event* events; |
29 | struct device* device; | 30 | struct device* device; |
31 | struct ftdev* ftdev; | ||
30 | }; | 32 | }; |
31 | 33 | ||
32 | struct ftdev { | 34 | struct ftdev { |
@@ -39,6 +41,7 @@ struct ftdev { | |||
39 | ftdev_alloc_t alloc; | 41 | ftdev_alloc_t alloc; |
40 | ftdev_free_t free; | 42 | ftdev_free_t free; |
41 | ftdev_can_open_t can_open; | 43 | ftdev_can_open_t can_open; |
44 | ftdev_write_t write; | ||
42 | }; | 45 | }; |
43 | 46 | ||
44 | struct ft_buffer* alloc_ft_buffer(unsigned int count, size_t size); | 47 | struct ft_buffer* alloc_ft_buffer(unsigned int count, size_t size); |