linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* input system: EVIOCSABS(abs) ioctl disabled, why?
@ 2004-07-28 12:41 Olav Kongas
  2004-07-28 13:43 ` Vojtech Pavlik
  0 siblings, 1 reply; 8+ messages in thread
From: Olav Kongas @ 2004-07-28 12:41 UTC (permalink / raw)
  To: linux-kernel, vojtech

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))) {

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2004-07-31 15:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-28 12:41 input system: EVIOCSABS(abs) ioctl disabled, why? Olav Kongas
2004-07-28 13:43 ` Vojtech Pavlik
2004-07-31  2:31   ` Kristian Høgsberg
2004-07-31  3:48     ` Lee Revell
2004-07-31  4:54     ` Dmitry Torokhov
2004-07-31  9:34       ` Vojtech Pavlik
2004-07-31  9:33     ` Vojtech Pavlik
2004-07-31 15:21       ` Kristian Høgsberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).