Commit 54f9e36cb83e7da17dc0596d365fe019a25c226f

Authored by Dmitry Torokhov
1 parent c8e4c77277

Input: simplify input_free_device()

Now that sysfs attributes that were marked for deletion can't access
their devices we do not need to set name, phys and uniq to NULL.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Showing 1 changed file with 1 additions and 7 deletions Side-by-side Diff

drivers/input/input.c
... ... @@ -1024,14 +1024,8 @@
1024 1024 */
1025 1025 void input_free_device(struct input_dev *dev)
1026 1026 {
1027   - if (dev) {
1028   -
1029   - mutex_lock(&dev->mutex);
1030   - dev->name = dev->phys = dev->uniq = NULL;
1031   - mutex_unlock(&dev->mutex);
1032   -
  1027 + if (dev)
1033 1028 input_put_device(dev);
1034   - }
1035 1029 }
1036 1030 EXPORT_SYMBOL(input_free_device);
1037 1031