summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mtdev.h4
-rw-r--r--src/iobuf.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/mtdev.h b/include/mtdev.h
index e2fdc9d..abb76da 100644
--- a/include/mtdev.h
+++ b/include/mtdev.h
@@ -159,8 +159,8 @@ int mtdev_idle(struct mtdev *dev, int fd, int ms);
159/** 159/**
160 * mtdev_fetch - fetch an event from the kernel device 160 * mtdev_fetch - fetch an event from the kernel device
161 * @dev: the mtdev in use 161 * @dev: the mtdev in use
162 * @ev: the kernel input event to fill
163 * @fd: file descriptor of the kernel device 162 * @fd: file descriptor of the kernel device
163 * @ev: the kernel input event to fill
164 * 164 *
165 * Fetch a kernel event from the kernel device. The read operation 165 * Fetch a kernel event from the kernel device. The read operation
166 * behaves as dictated by the file descriptior; if O_NONBLOCK is not 166 * behaves as dictated by the file descriptior; if O_NONBLOCK is not
@@ -169,7 +169,7 @@ int mtdev_idle(struct mtdev *dev, int fd, int ms);
169 * On success, returns the number of events read. Otherwise, a standard 169 * On success, returns the number of events read. Otherwise, a standard
170 * negative error number is returned. 170 * negative error number is returned.
171 */ 171 */
172int mtdev_fetch(struct mtdev *dev, struct input_event *ev, int fd); 172int mtdev_fetch(struct mtdev *dev, int fd, struct input_event *ev);
173 173
174/** 174/**
175 * mtdev_put - put an event into the converter 175 * mtdev_put - put an event into the converter
diff --git a/src/iobuf.c b/src/iobuf.c
index 83e531a..199e0d8 100644
--- a/src/iobuf.c
+++ b/src/iobuf.c
@@ -41,7 +41,7 @@ int mtdev_idle(struct mtdev *dev, int fd, int ms)
41 poll(&fds, 1, ms) <= 0; 41 poll(&fds, 1, ms) <= 0;
42} 42}
43 43
44int mtdev_fetch(struct mtdev *dev, struct input_event *ev, int fd) 44int mtdev_fetch(struct mtdev *dev, int fd, struct input_event *ev)
45{ 45{
46 struct mtdev_iobuf *buf = &dev->state->iobuf; 46 struct mtdev_iobuf *buf = &dev->state->iobuf;
47 int n = buf->head - buf->tail; 47 int n = buf->head - buf->tail;
@@ -69,7 +69,7 @@ int mtdev_pull(struct mtdev *dev, int fd, int max_events)
69 struct input_event ev; 69 struct input_event ev;
70 int ret, count = 0; 70 int ret, count = 0;
71 while (max_events-- && !evbuf_full(&state->inbuf)) { 71 while (max_events-- && !evbuf_full(&state->inbuf)) {
72 ret = mtdev_fetch(dev, &ev, fd); 72 ret = mtdev_fetch(dev, fd, &ev);
73 if (ret < 0) 73 if (ret < 0)
74 return ret; 74 return ret;
75 if (ret == 0) 75 if (ret == 0)