diff options
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r-- | drivers/input/evdev.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 7a7a026ba712..c238116400b3 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -25,7 +25,6 @@ struct evdev { | |||
25 | int exist; | 25 | int exist; |
26 | int open; | 26 | int open; |
27 | int minor; | 27 | int minor; |
28 | char name[16]; | ||
29 | struct input_handle handle; | 28 | struct input_handle handle; |
30 | wait_queue_head_t wait; | 29 | wait_queue_head_t wait; |
31 | struct evdev_client *grab; | 30 | struct evdev_client *grab; |
@@ -609,7 +608,8 @@ static long evdev_do_ioctl(struct file *file, unsigned int cmd, | |||
609 | p, compat_mode); | 608 | p, compat_mode); |
610 | 609 | ||
611 | if (_IOC_NR(cmd) == _IOC_NR(EVIOCGNAME(0))) | 610 | if (_IOC_NR(cmd) == _IOC_NR(EVIOCGNAME(0))) |
612 | return str_to_user(dev->name, _IOC_SIZE(cmd), p); | 611 | return str_to_user(dev_name(&evdev->dev), |
612 | _IOC_SIZE(cmd), p); | ||
613 | 613 | ||
614 | if (_IOC_NR(cmd) == _IOC_NR(EVIOCGPHYS(0))) | 614 | if (_IOC_NR(cmd) == _IOC_NR(EVIOCGPHYS(0))) |
615 | return str_to_user(dev->phys, _IOC_SIZE(cmd), p); | 615 | return str_to_user(dev->phys, _IOC_SIZE(cmd), p); |
@@ -807,16 +807,15 @@ static int evdev_connect(struct input_handler *handler, struct input_dev *dev, | |||
807 | mutex_init(&evdev->mutex); | 807 | mutex_init(&evdev->mutex); |
808 | init_waitqueue_head(&evdev->wait); | 808 | init_waitqueue_head(&evdev->wait); |
809 | 809 | ||
810 | snprintf(evdev->name, sizeof(evdev->name), "event%d", minor); | 810 | dev_set_name(&evdev->dev, "event%d", minor); |
811 | evdev->exist = 1; | 811 | evdev->exist = 1; |
812 | evdev->minor = minor; | 812 | evdev->minor = minor; |
813 | 813 | ||
814 | evdev->handle.dev = input_get_device(dev); | 814 | evdev->handle.dev = input_get_device(dev); |
815 | evdev->handle.name = evdev->name; | 815 | evdev->handle.name = dev_name(&evdev->dev); |
816 | evdev->handle.handler = handler; | 816 | evdev->handle.handler = handler; |
817 | evdev->handle.private = evdev; | 817 | evdev->handle.private = evdev; |
818 | 818 | ||
819 | dev_set_name(&evdev->dev, evdev->name); | ||
820 | evdev->dev.devt = MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor); | 819 | evdev->dev.devt = MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor); |
821 | evdev->dev.class = &input_class; | 820 | evdev->dev.class = &input_class; |
822 | evdev->dev.parent = &dev->dev; | 821 | evdev->dev.parent = &dev->dev; |