From b76660d71e2ea77752025089bd71deffad64e325 Mon Sep 17 00:00:00 2001 From: Henrik Rydberg Date: Mon, 26 Jul 2010 13:51:34 +0200 Subject: Test implementation of grail api This patch introduces the grail API, and a program to test it (evlink). Signed-off-by: Henrik Rydberg --- src/touch-dev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/touch-dev.c') diff --git a/src/touch-dev.c b/src/touch-dev.c index 80cc82f..dc23baa 100644 --- a/src/touch-dev.c +++ b/src/touch-dev.c @@ -65,11 +65,9 @@ static void finish_touch(struct touch_dev *dev, static void finish_packet(struct touch_dev *dev, const struct input_event *syn) { - static const touch_time_t ms = 1000; - touch_time_t time = syn->time.tv_usec / ms + syn->time.tv_sec * ms; finish_touch(dev, dev->impl); if (dev->sync) - dev->sync(dev, time); + dev->sync(dev, syn); } static int handle_abs_event(struct touch_dev *dev, @@ -133,6 +131,8 @@ int touch_dev_open(struct touch_dev *dev, int fd) if (!x) return -ENOMEM; ret = mtdev_open(&x->mtdev, fd); + if (!ret && !x->mtdev.caps.has_mtdata) + ret = -ENODEV; if (ret) goto error; for (i = 0; i < DIM_TOUCH; i++) -- cgit v1.2.3