Re: [PATCH] input: fix EVIOCGNAME regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx>
> Reported-by: Sven Neumann <s.neumann@xxxxxxxxxxxx>
> Cc: Thadeu Lima de Souza Cascardo <cascardo@xxxxxxxxxxxxxx>
> Cc: Dmitry Torokhov <dtor@xxxxxxx>
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux