Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752853AbbDRDnq (ORCPT ); Fri, 17 Apr 2015 23:43:46 -0400 Received: from mail-ig0-f173.google.com ([209.85.213.173]:33339 "EHLO mail-ig0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751705AbbDRDnk (ORCPT ); Fri, 17 Apr 2015 23:43:40 -0400 Date: Fri, 17 Apr 2015 20:43:36 -0700 From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Scott Liu , Charlie Mooney , linux-kernel@vger.kernel.org Subject: [PATCH] Input: elants_i2c - zero-extend hardware ID in firmware name Message-ID: <20150418034336.GA31454@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1110 Lines: 33 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. Signed-off-by: Dmitry Torokhov --- drivers/input/touchscreen/elants_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index 43b3c9c..0efd766 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; -- 2.2.0.rc0.207.ga3a616c -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/