/* Grabs an event device (along with underlying input device). This function is called with evdev->mutex taken.  */
static int evdev_grab(struct evdev *evdev, struct evdev_client *client)
/* Grabs an event device (along with underlying input device). This function is called with evdev->mutex taken.  */
static int evdev_grab(struct evdev *evdev, struct evdev_client *client)
{
	int error;
	if (evdev->grab)
		return -EBUSY;
	error = input_grab_device(&evdev->handle);
	if (error)
		return error;
	rcu_assign_pointer(evdev->grab, client);
	synchronize_rcu();
	return 0;
}