提交 bf1d50fa 编写于 作者: R Richard Leitner 提交者: Dmitry Torokhov

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: NRichard Leitner <richard.leitner@skidata.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 2c9a9cfe
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册