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: Colin Cross <ccross@android.com>
This commit is contained in:
Colin Cross
2014-03-11 18:19:53 -07:00
parent 625c814c7d
commit 32a771aaf0
2 changed files with 15 additions and 2 deletions

View File

@@ -811,6 +811,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)
{
@@ -821,6 +826,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)
@@ -884,12 +890,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;

View File

@@ -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 */