From c9c4f4cda362679567bc4bc04ffedc5d984e2329 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Fri, 18 Jun 2010 01:32:43 +0200 Subject: 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 --- include/mtdev.h | 4 ++-- 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) -- cgit v1.2.3