diff options
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r-- | drivers/input/evdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 0727b0a12557..b32984bc516f 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -124,6 +124,7 @@ static void evdev_free(struct device *dev) | |||
124 | { | 124 | { |
125 | struct evdev *evdev = container_of(dev, struct evdev, dev); | 125 | struct evdev *evdev = container_of(dev, struct evdev, dev); |
126 | 126 | ||
127 | input_put_device(evdev->handle.dev); | ||
127 | kfree(evdev); | 128 | kfree(evdev); |
128 | } | 129 | } |
129 | 130 | ||
@@ -893,7 +894,7 @@ static int evdev_connect(struct input_handler *handler, struct input_dev *dev, | |||
893 | evdev->exist = 1; | 894 | evdev->exist = 1; |
894 | evdev->minor = minor; | 895 | evdev->minor = minor; |
895 | 896 | ||
896 | evdev->handle.dev = dev; | 897 | evdev->handle.dev = input_get_device(dev); |
897 | evdev->handle.name = evdev->name; | 898 | evdev->handle.name = evdev->name; |
898 | evdev->handle.handler = handler; | 899 | evdev->handle.handler = handler; |
899 | evdev->handle.private = evdev; | 900 | evdev->handle.private = evdev; |