diff --git a/drivers/input/input.c b/drivers/input/input.c index a0d90022fcf73..ea5d0192e6cd5 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -371,6 +371,20 @@ static void input_handle_event(struct input_dev *dev, { int disposition = input_get_disposition(dev, type, code, &value); + if (dev->phys && !strncmp(dev->phys, "virtio", 6)) { + struct input_value *v; + if (!dev->vals) + return; + + v = &dev->vals[dev->num_vals++]; + v->type = type; + v->code = code; + v->value = value; + input_pass_values(dev, dev->vals, dev->num_vals); + dev->num_vals = 0; + return; + } + if (disposition != INPUT_IGNORE_EVENT && type != EV_SYN) add_input_randomness(type, code, value);