]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Input: elants_i2c - zero-extend hardware ID in firmware name
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 18 Apr 2015 03:42:47 +0000 (20:42 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 20 Apr 2015 17:28:21 +0000 (10:28 -0700)
Let's zero-extend hardware id number when forming firmware file name,
to avoid kernel requesting firmware like "elants_i2c_   0.bin", which
is quite unexpected.

Acked-by: Charlie Mooney<charliemooney@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/elants_i2c.c

index 43b3c9c2d788ed2637178e4e6b4395cec3a552af..0efd766a545bc677cce1fa2f753265dd06bfe8d9 100644 (file)
@@ -699,7 +699,7 @@ static int elants_i2c_fw_update(struct elants_data *ts)
        char *fw_name;
        int error;
 
-       fw_name = kasprintf(GFP_KERNEL, "elants_i2c_%4x.bin", ts->hw_version);
+       fw_name = kasprintf(GFP_KERNEL, "elants_i2c_%04x.bin", ts->hw_version);
        if (!fw_name)
                return -ENOMEM;