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 <s.neumann@raumfeld.com>
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reviewed-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
committed by
Dmitry Torokhov
parent
f0a14de2f8
commit
f936601471
@@ -536,7 +536,7 @@ static int joydev_ioctl_common(struct joydev *joydev,
|
||||
default:
|
||||
if ((cmd & ~IOCSIZE_MASK) == JSIOCGNAME(0)) {
|
||||
int len;
|
||||
const char *name = dev_name(&dev->dev);
|
||||
const char *name = dev->name;
|
||||
|
||||
if (!name)
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user