From: Dmitry Torokhov Date: Sat, 18 Apr 2015 03:42:47 +0000 (-0700) Subject: Input: elants_i2c - zero-extend hardware ID in firmware name X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8c0776a8f046d5fb1804e525c3b6e9f897fe0d3f;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git Input: elants_i2c - zero-extend hardware ID in firmware name 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 Signed-off-by: Dmitry Torokhov --- diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index 43b3c9c2d788..0efd766a545b 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c @@ -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;