input system: EVIOCSABS(abs) ioctl disabled, why?

From: Olav Kongas
Date: Wed Jul 28 2004 - 07:44:18 EST


Hi,

When trying to feed calibration information to a touchscreen driver with
the EVIOCSABS(abs) ioctl command, I noticed that this command is disabled
in 2.6.7. Only after the modification given in the patch below it was
possible to use this ioctl command.

Why is the EVIOCSABS command disabled? I cannot imagine that nobody uses
or needs it. The touchscreen drivers have no good way of determining the
absolute limits themselves, do they?

Thanks in advance,
Olav


--- linux-2.6.7/drivers/input/evdev.c.or 2004-07-21 13:27:03.000000000 +0300
+++ linux-2.6.7/drivers/input/evdev.c 2004-07-21 15:53:46.000000000 +0300
@@ -284,7 +284,7 @@

default:

- if (_IOC_TYPE(cmd) != 'E' || _IOC_DIR(cmd) != _IOC_READ)
+ if (_IOC_TYPE(cmd) != 'E' || (_IOC_DIR(cmd) != _IOC_READ && (cmd & ~ABS_MAX) != EVIOCSABS(0)))
return -EINVAL;

if ((_IOC_NR(cmd) & ~EV_MAX) == _IOC_NR(EVIOCGBIT(0,0))) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/