aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/ftdev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/litmus/ftdev.h')
-rw-r--r--include/litmus/ftdev.h5
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 */
17typedef int (*ftdev_alloc_t)(struct ftdev* dev, unsigned int buf_no); 17typedef int (*ftdev_alloc_t)(struct ftdev* dev, unsigned int buf_no);
18typedef void (*ftdev_free_t)(struct ftdev* dev, unsigned int buf_no); 18typedef void (*ftdev_free_t)(struct ftdev* dev, unsigned int buf_no);
19 19/* Let devices handle writes from userspace. No synchronization provided. */
20typedef ssize_t (*ftdev_write_t)(struct ft_buffer* buf, size_t len, const char __user *from);
20 21
21struct ftdev_event; 22struct 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
32struct ftdev { 34struct 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
44struct ft_buffer* alloc_ft_buffer(unsigned int count, size_t size); 47struct ft_buffer* alloc_ft_buffer(unsigned int count, size_t size);