summaryrefslogtreecommitdiffstats
path: root/drivers/input/serio
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2014-10-09 00:21:32 +0200
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2014-10-10 00:27:25 +0200
commit0224ec9e9f111b1c39ec00a10de4858061b4afea (patch)
tree11aacc1dc06c5d2f3eff3cc812e777c5418938bd /drivers/input/serio
parentInput: avoid negative input device numbers (diff)
downloadlinux-0224ec9e9f111b1c39ec00a10de4858061b4afea.tar.xz
linux-0224ec9e9f111b1c39ec00a10de4858061b4afea.zip
Input: serio - avoid negative serio device numbers
Fix the format string for serio 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/serio')
-rw-r--r--drivers/input/serio/serio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c
index b29134de983b..d399b8b0f000 100644
--- a/drivers/input/serio/serio.c
+++ b/drivers/input/serio/serio.c
@@ -524,8 +524,8 @@ static void serio_init_port(struct serio *serio)
spin_lock_init(&serio->lock);
mutex_init(&serio->drv_mutex);
device_initialize(&serio->dev);
- dev_set_name(&serio->dev, "serio%ld",
- (long)atomic_inc_return(&serio_no) - 1);
+ dev_set_name(&serio->dev, "serio%lu",
+ (unsigned long)atomic_inc_return(&serio_no) - 1);
serio->dev.bus = &serio_bus;
serio->dev.release = serio_release_port;
serio->dev.groups = serio_device_attr_groups;