mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
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:
@@ -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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user