diff options
author | Henrik Rydberg <rydberg@euromail.se> | 2010-06-18 01:32:43 +0200 |
---|---|---|
committer | Henrik Rydberg <rydberg@euromail.se> | 2010-06-18 01:32:43 +0200 |
commit | c9c4f4cda362679567bc4bc04ffedc5d984e2329 (patch) | |
tree | eedf4a098d81a959c6c40a294c65302b007d1982 | |
parent | d4704c0d6d70a2815c5ca12d74ba11cc7be69e20 (diff) | |
download | mtdev-git-c9c4f4cda362679567bc4bc04ffedc5d984e2329.tar.gz |
Rectify argument order in mtdev_fetch
The argument order in mtdev_fetch() differs from all other
usages involved the file descriptor. Fixed with this patch.
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
-rw-r--r-- | include/mtdev.h | 4 | ||||
-rw-r--r-- | src/iobuf.c | 4 |
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); /** * mtdev_fetch - fetch an event from the kernel device * @dev: the mtdev in use - * @ev: the kernel input event to fill * @fd: file descriptor of the kernel device + * @ev: the kernel input event to fill * * Fetch a kernel event from the kernel device. The read operation * 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); * On success, returns the number of events read. Otherwise, a standard * negative error number is returned. */ -int mtdev_fetch(struct mtdev *dev, struct input_event *ev, int fd); +int mtdev_fetch(struct mtdev *dev, int fd, struct input_event *ev); /** * 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) poll(&fds, 1, ms) <= 0; } -int mtdev_fetch(struct mtdev *dev, struct input_event *ev, int fd) +int mtdev_fetch(struct mtdev *dev, int fd, struct input_event *ev) { struct mtdev_iobuf *buf = &dev->state->iobuf; int n = buf->head - buf->tail; @@ -69,7 +69,7 @@ int mtdev_pull(struct mtdev *dev, int fd, int max_events) struct input_event ev; int ret, count = 0; while (max_events-- && !evbuf_full(&state->inbuf)) { - ret = mtdev_fetch(dev, &ev, fd); + ret = mtdev_fetch(dev, fd, &ev); if (ret < 0) return ret; if (ret == 0) |