diff options
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index efa1b1f75393..a9a706f8fff9 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -588,18 +588,9 @@ static inline void input_proc_exit(void) { } | |||
588 | static ssize_t input_dev_show_##name(struct class_device *dev, char *buf) \ | 588 | static ssize_t input_dev_show_##name(struct class_device *dev, char *buf) \ |
589 | { \ | 589 | { \ |
590 | struct input_dev *input_dev = to_input_dev(dev); \ | 590 | struct input_dev *input_dev = to_input_dev(dev); \ |
591 | int retval; \ | ||
592 | \ | 591 | \ |
593 | retval = mutex_lock_interruptible(&input_dev->mutex); \ | 592 | return scnprintf(buf, PAGE_SIZE, "%s\n", \ |
594 | if (retval) \ | 593 | input_dev->name ? input_dev->name : ""); \ |
595 | return retval; \ | ||
596 | \ | ||
597 | retval = scnprintf(buf, PAGE_SIZE, \ | ||
598 | "%s\n", input_dev->name ? input_dev->name : ""); \ | ||
599 | \ | ||
600 | mutex_unlock(&input_dev->mutex); \ | ||
601 | \ | ||
602 | return retval; \ | ||
603 | } \ | 594 | } \ |
604 | static CLASS_DEVICE_ATTR(name, S_IRUGO, input_dev_show_##name, NULL); | 595 | static CLASS_DEVICE_ATTR(name, S_IRUGO, input_dev_show_##name, NULL); |
605 | 596 | ||
@@ -1049,10 +1040,6 @@ void input_unregister_device(struct input_dev *dev) | |||
1049 | sysfs_remove_group(&dev->cdev.kobj, &input_dev_id_attr_group); | 1040 | sysfs_remove_group(&dev->cdev.kobj, &input_dev_id_attr_group); |
1050 | sysfs_remove_group(&dev->cdev.kobj, &input_dev_attr_group); | 1041 | sysfs_remove_group(&dev->cdev.kobj, &input_dev_attr_group); |
1051 | 1042 | ||
1052 | mutex_lock(&dev->mutex); | ||
1053 | dev->name = dev->phys = dev->uniq = NULL; | ||
1054 | mutex_unlock(&dev->mutex); | ||
1055 | |||
1056 | class_device_unregister(&dev->cdev); | 1043 | class_device_unregister(&dev->cdev); |
1057 | 1044 | ||
1058 | input_wakeup_procfs_readers(); | 1045 | input_wakeup_procfs_readers(); |