linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Daniel Mack <daniel@caiaq.de>
Cc: linux-input@vger.kernel.org, s.neumann@raumfeld.com,
	Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Subject: Re: [PATCH] input: fix EVIOCGNAME regression
Date: Mon, 13 Jul 2009 09:52:05 -0700	[thread overview]
Message-ID: <20090713165205.GA28063@dtor-d630.eng.vmware.com> (raw)
In-Reply-To: <1247503151-15615-1-git-send-email-daniel@caiaq.de>

Hi Daniel,

On Mon, Jul 13, 2009 at 06:39:11PM +0200, Daniel Mack wrote:
> Commit 3d5cb60e ("Input: simplify name handling for certain input
> handles") introduced a regression for the EVIOCGNAME ioctl.
> 
> Before this, patch, the platform device's name was given back to
> userspace which was good to identify devices. After this patch, the
> device was ("event%d", minor) which is not descriptive at all.
> 
> This fixes the behaviour by taking input_dev->name.
> 
> Signed-off-by: Daniel Mack <daniel@caiaq.de>
> Reported-by: Sven Neumann <s.neumann@raumfeld.com>
> Cc: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
> Cc: Dmitry Torokhov <dtor@mail.ru>
> ---
>  drivers/input/evdev.c |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
> index 114efd8..c81e042 100644
> --- a/drivers/input/evdev.c
> +++ b/drivers/input/evdev.c
> @@ -608,8 +608,8 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd,
>  						    p, compat_mode);
>  
>  			if (_IOC_NR(cmd) == _IOC_NR(EVIOCGNAME(0)))
> -				return str_to_user(dev_name(&evdev->dev),
> -						   _IOC_SIZE(cmd), p);
> +				return str_to_user(evdev->handle.name,
> +						    _IOC_SIZE(cmd), p);

No, this actually should be just dev->name, handle names were always in
the form of eventX or jsX. The change below is not needed either.

Btw, there is the similar issue in joydev.c as well.

-- 
Dmitry

  reply	other threads:[~2009-07-13 16:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-13 16:39 [PATCH] input: fix EVIOCGNAME regression Daniel Mack
2009-07-13 16:52 ` Dmitry Torokhov [this message]
2009-07-13 17:11   ` Daniel Mack
2009-07-13 20:45     ` Thadeu Lima de Souza Cascardo
2009-07-14  4:29     ` Dmitry Torokhov
2009-07-15 15:21     ` Dmitry Torokhov

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=20090713165205.GA28063@dtor-d630.eng.vmware.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=cascardo@holoscopio.com \
    --cc=daniel@caiaq.de \
    --cc=linux-input@vger.kernel.org \
    --cc=s.neumann@raumfeld.com \
    /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;
as well as URLs for NNTP newsgroup(s).