diff options
author | Richard Leitner <richard.leitner@skidata.com> | 2014-10-08 23:24:15 +0200 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2014-10-10 00:27:24 +0200 |
commit | bf1d50fa74df0339c925aa7e2ff9de60a42c30be (patch) | |
tree | 400ccefae0b821b6eb77bde90e9b094176e29546 /drivers/input | |
parent | Input: automatically set EV_ABS bit in input_set_abs_params (diff) | |
download | linux-bf1d50fa74df0339c925aa7e2ff9de60a42c30be.tar.xz linux-bf1d50fa74df0339c925aa7e2ff9de60a42c30be.zip |
Input: avoid negative input device numbers
Fix the format string for input device name generation to avoid negative
device numbers when the id exceeds the maximum signed integer value.
Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/input.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index d2e06cc7e179..0f175f55782b 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -1789,7 +1789,7 @@ struct input_dev *input_allocate_device(void) INIT_LIST_HEAD(&dev->h_list); INIT_LIST_HEAD(&dev->node); - dev_set_name(&dev->dev, "input%ld", + dev_set_name(&dev->dev, "input%lu", (unsigned long) atomic_inc_return(&input_no) - 1); __module_get(THIS_MODULE); |