mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Olav Kongas <olav@enif.ee>
Cc: linux-kernel@vger.kernel.org
Subject: Re: input system: EVIOCSABS(abs) ioctl disabled, why?
Date: Wed, 28 Jul 2004 15:43:13 +0200	[thread overview]
Message-ID: <20040728134313.GB4831@ucw.cz> (raw)
In-Reply-To: <Pine.LNX.4.58.0407281453560.16069@serv.enif.ee>

On Wed, Jul 28, 2004 at 03:41:28PM +0300, Olav Kongas wrote:

> 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

It's a bug. I'll fix it.

> or needs it.

Nobody uses it, surprisingly.

> The touchscreen drivers have no good way of determining the
> absolute limits themselves, do they?

Many do.

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

-- 
Vojtech Pavlik
SuSE Labs, SuSE CR

  reply	other threads:[~2004-07-28 13:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-28 12:41 Olav Kongas
2004-07-28 13:43 ` Vojtech Pavlik [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040728134313.GB4831@ucw.cz \
    --to=vojtech@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=olav@enif.ee \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®