diff options
Diffstat (limited to 'drivers/input/joydev.c')
-rw-r--r-- | drivers/input/joydev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index b62b5891f399..f362883c94e3 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -243,7 +243,6 @@ static int joydev_release(struct inode *inode, struct file *file) | |||
243 | kfree(client); | 243 | kfree(client); |
244 | 244 | ||
245 | joydev_close_device(joydev); | 245 | joydev_close_device(joydev); |
246 | put_device(&joydev->dev); | ||
247 | 246 | ||
248 | return 0; | 247 | return 0; |
249 | } | 248 | } |
@@ -270,7 +269,6 @@ static int joydev_open(struct inode *inode, struct file *file) | |||
270 | file->private_data = client; | 269 | file->private_data = client; |
271 | nonseekable_open(inode, file); | 270 | nonseekable_open(inode, file); |
272 | 271 | ||
273 | get_device(&joydev->dev); | ||
274 | return 0; | 272 | return 0; |
275 | 273 | ||
276 | err_free_client: | 274 | err_free_client: |
@@ -858,6 +856,7 @@ static int joydev_connect(struct input_handler *handler, struct input_dev *dev, | |||
858 | goto err_free_joydev; | 856 | goto err_free_joydev; |
859 | 857 | ||
860 | cdev_init(&joydev->cdev, &joydev_fops); | 858 | cdev_init(&joydev->cdev, &joydev_fops); |
859 | joydev->cdev.kobj.parent = &joydev->dev.kobj; | ||
861 | error = cdev_add(&joydev->cdev, joydev->dev.devt, 1); | 860 | error = cdev_add(&joydev->cdev, joydev->dev.devt, 1); |
862 | if (error) | 861 | if (error) |
863 | goto err_unregister_handle; | 862 | goto err_unregister_handle; |