diff options
Diffstat (limited to 'drivers/input/evdev.c')
-rw-r--r-- | drivers/input/evdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 6ae2ac47c9c8..f0f8928b3c8a 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -292,7 +292,6 @@ static int evdev_release(struct inode *inode, struct file *file) | |||
292 | kfree(client); | 292 | kfree(client); |
293 | 293 | ||
294 | evdev_close_device(evdev); | 294 | evdev_close_device(evdev); |
295 | put_device(&evdev->dev); | ||
296 | 295 | ||
297 | return 0; | 296 | return 0; |
298 | } | 297 | } |
@@ -331,7 +330,6 @@ static int evdev_open(struct inode *inode, struct file *file) | |||
331 | file->private_data = client; | 330 | file->private_data = client; |
332 | nonseekable_open(inode, file); | 331 | nonseekable_open(inode, file); |
333 | 332 | ||
334 | get_device(&evdev->dev); | ||
335 | return 0; | 333 | return 0; |
336 | 334 | ||
337 | err_free_client: | 335 | err_free_client: |
@@ -1001,6 +999,7 @@ static int evdev_connect(struct input_handler *handler, struct input_dev *dev, | |||
1001 | goto err_free_evdev; | 999 | goto err_free_evdev; |
1002 | 1000 | ||
1003 | cdev_init(&evdev->cdev, &evdev_fops); | 1001 | cdev_init(&evdev->cdev, &evdev_fops); |
1002 | evdev->cdev.kobj.parent = &evdev->dev.kobj; | ||
1004 | error = cdev_add(&evdev->cdev, evdev->dev.devt, 1); | 1003 | error = cdev_add(&evdev->cdev, evdev->dev.devt, 1); |
1005 | if (error) | 1004 | if (error) |
1006 | goto err_unregister_handle; | 1005 | goto err_unregister_handle; |