Skip to content

Commit

Permalink
Input: elants_i2c - zero-extend hardware ID in firmware name
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov committed Apr 20, 2015
1 parent 2310568 commit 8c0776a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/touchscreen/elants_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8c0776a

Please sign in to comment.