uterm_input: don't test device capability in wakeup_dev

The current code ignores non-keyboard devices, and various places
implicitly assume that it does. If we ever need finer granularity, we
should review (and probably restructure) the code for that; but for now
this test seems out of place.

Signed-off-by: Ran Benita <ran234@gmail.com>
This commit is contained in:
Ran Benita 2012-10-29 22:00:16 +02:00
parent 61f4a3c29b
commit 2fc5ae17e4

View File

@ -110,18 +110,15 @@ static int input_wake_up_dev(struct uterm_input_dev *dev)
return -EFAULT;
}
if (dev->capabilities & UTERM_DEVICE_HAS_KEYS) {
/* rediscover the keyboard state if sth changed during sleep */
uxkb_dev_reset(dev);
/* rediscover the keyboard state if sth changed during sleep */
uxkb_dev_reset(dev);
ret = ev_eloop_new_fd(dev->input->eloop, &dev->fd,
dev->rfd, EV_READABLE,
input_data_dev, dev);
if (ret) {
close(dev->rfd);
dev->rfd = -1;
return ret;
}
ret = ev_eloop_new_fd(dev->input->eloop, &dev->fd, dev->rfd,
EV_READABLE, input_data_dev, dev);
if (ret) {
close(dev->rfd);
dev->rfd = -1;
return ret;
}
return 0;