/* Fail all ouitstanding requests so handlers don't wait for the userspace to finish processing them.  */
static void uinput_flush_requests(struct uinput_device *udev)
/* Fail all ouitstanding requests so handlers don't wait for the userspace to finish processing them.  */
static void uinput_flush_requests(struct uinput_device *udev)
{
	struct uinput_request *request;
	int i;
	spin_lock(&udev->requests_lock);
	for (i = 0; i < UINPUT_NUM_REQUESTS; i++) {
		request = udev->requests[i];
		if (request) {
			request->retval = -ENODEV;
			uinput_request_done(udev, request);
		}
	}
	spin_unlock(&udev->requests_lock);
}