Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bf1d50fa authored by Richard Leitner's avatar Richard Leitner Committed by Dmitry Torokhov
Browse files

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: default avatarRichard Leitner <richard.leitner@skidata.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 2c9a9cfe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);