diff options
-rw-r--r-- | drivers/input/input.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 0f175f55782b..04217c2e345c 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -1775,7 +1775,7 @@ EXPORT_SYMBOL_GPL(input_class); | |||
1775 | */ | 1775 | */ |
1776 | struct input_dev *input_allocate_device(void) | 1776 | struct input_dev *input_allocate_device(void) |
1777 | { | 1777 | { |
1778 | static atomic_t input_no = ATOMIC_INIT(0); | 1778 | static atomic_t input_no = ATOMIC_INIT(-1); |
1779 | struct input_dev *dev; | 1779 | struct input_dev *dev; |
1780 | 1780 | ||
1781 | dev = kzalloc(sizeof(struct input_dev), GFP_KERNEL); | 1781 | dev = kzalloc(sizeof(struct input_dev), GFP_KERNEL); |
@@ -1790,7 +1790,7 @@ struct input_dev *input_allocate_device(void) | |||
1790 | INIT_LIST_HEAD(&dev->node); | 1790 | INIT_LIST_HEAD(&dev->node); |
1791 | 1791 | ||
1792 | dev_set_name(&dev->dev, "input%lu", | 1792 | dev_set_name(&dev->dev, "input%lu", |
1793 | (unsigned long) atomic_inc_return(&input_no) - 1); | 1793 | (unsigned long)atomic_inc_return(&input_no)); |
1794 | 1794 | ||
1795 | __module_get(THIS_MODULE); | 1795 | __module_get(THIS_MODULE); |
1796 | } | 1796 | } |