aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/evdev.c3
-rw-r--r--drivers/input/joydev.c2
2 files changed, 2 insertions, 3 deletions
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,
608 p, compat_mode); 608 p, compat_mode);
609 609
610 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGNAME(0))) 610 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGNAME(0)))
611 return str_to_user(dev_name(&evdev->dev), 611 return str_to_user(dev->name, _IOC_SIZE(cmd), p);
612 _IOC_SIZE(cmd), p);
613 612
614 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGPHYS(0))) 613 if (_IOC_NR(cmd) == _IOC_NR(EVIOCGPHYS(0)))
615 return str_to_user(dev->phys, _IOC_SIZE(cmd), p); 614 return str_to_user(dev->phys, _IOC_SIZE(cmd), p);
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c
index 0e12f89276a3..4cfd084fa897 100644
--- a/drivers/input/joydev.c
+++ b/drivers/input/joydev.c
@@ -536,7 +536,7 @@ static int joydev_ioctl_common(struct joydev *joydev,
536 default: 536 default:
537 if ((cmd & ~IOCSIZE_MASK) == JSIOCGNAME(0)) { 537 if ((cmd & ~IOCSIZE_MASK) == JSIOCGNAME(0)) {
538 int len; 538 int len;
539 const char *name = dev_name(&dev->dev); 539 const char *name = dev->name;
540 540
541 if (!name) 541 if (!name)
542 return 0; 542 return 0;