Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 311d4b02 authored by Colin Cross's avatar Colin Cross Committed by Ruchi Kandoi
Browse files

HACK: input: evdev: disable EVIOCREVOKE



Android used the same ioctl signature as EVOICREVOKE for
EVIOCSSUSPENDBLOCK.  Disable EVIOCREVOKE until Android userspace
is available that uses EPOLLWAKEUP instead.

Change-Id: I51aa63fd19b20a3966bef1c46d1bb845c2589a5a
Signed-off-by: default avatarColin Cross <ccross@android.com>
parent d6620cfd
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -795,6 +795,11 @@ static int evdev_handle_mt_request(struct input_dev *dev,
	return 0;
}

/*
 * HACK: disable conflicting EVIOCREVOKE until Android userspace stops using
 * EVIOCSSUSPENDBLOCK
 */
/*
static int evdev_revoke(struct evdev *evdev, struct evdev_client *client,
			struct file *file)
{
@@ -805,6 +810,7 @@ static int evdev_revoke(struct evdev *evdev, struct evdev_client *client,

	return 0;
}
*/

static long evdev_do_ioctl(struct file *file, unsigned int cmd,
			   void __user *p, int compat_mode)
@@ -868,12 +874,17 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
		else
			return evdev_ungrab(evdev, client);

	/*
	 * HACK: disable conflicting EVIOCREVOKE until Android userspace stops
	 * using EVIOCSSUSPENDBLOCK
	 */
	/*
	case EVIOCREVOKE:
		if (p)
			return -EINVAL;
		else
			return evdev_revoke(evdev, client, file);

	*/
	case EVIOCSCLOCKID:
		if (copy_from_user(&i, p, sizeof(unsigned int)))
			return -EFAULT;
+3 −1
Original line number Diff line number Diff line
@@ -152,7 +152,9 @@ struct input_keymap_entry {
#define EVIOCGEFFECTS		_IOR('E', 0x84, int)			/* Report number of effects playable at the same time */

#define EVIOCGRAB		_IOW('E', 0x90, int)			/* Grab/Release device */
#define EVIOCREVOKE		_IOW('E', 0x91, int)			/* Revoke device access */

/* HACK: disable conflicting EVIOCREVOKE until Android userspace stops using EVIOCSSUSPENDBLOCK */
/*#define EVIOCREVOKE		_IOW('E', 0x91, int)*/			/* Revoke device access */

#define EVIOCSCLOCKID		_IOW('E', 0xa0, int)			/* Set clockid to be used for timestamps */