From f936601471d1454dacbd3b2a961fd4d883090aeb Mon Sep 17 00:00:00 2001 From: Daniel Mack Date: Mon, 13 Jul 2009 22:22:49 -0700 Subject: Input: fix EVIOCGNAME/JSIOCGNAME regression Commit 3d5cb60e ("Input: simplify name handling for certain input handles") introduced a regression for the EVIOCGNAME/JSIOCGNAME 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 is ("event%d", minor) which is not descriptive at all. This fixes the behaviour by taking dev->name. Reported-by: Sven Neumann Signed-off-by: Daniel Mack Reviewed-by: Thadeu Lima de Souza Cascardo Signed-off-by: Dmitry Torokhov --- drivers/input/evdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/input/evdev.c') diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 114efd8dc8f5..1148140d08a1 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c @@ -608,8 +608,7 @@ 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(dev->name, _IOC_SIZE(cmd), p); if (_IOC_NR(cmd) == _IOC_NR(EVIOCGPHYS(0))) return str_to_user(dev->phys, _IOC_SIZE(cmd), p); -- cgit v1.2.3