From patchwork Sat Apr 18 03:43:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 6236571 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A5731BF4A6 for ; Sat, 18 Apr 2015 03:44:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E44BE20382 for ; Sat, 18 Apr 2015 03:43:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0496220221 for ; Sat, 18 Apr 2015 03:43:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751809AbbDRDnl (ORCPT ); Fri, 17 Apr 2015 23:43:41 -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 Received: by igbpi8 with SMTP id pi8so36267727igb.0; Fri, 17 Apr 2015 20:43:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; bh=O43SKwF1c5GRmdl1RA2wHwQ9fj1oAPijoDNHJPSFVKs=; b=rqCnQxIi4YdC0gr7uNrgy09whIhRPdgI/dEDDwzBCs09Xg0Bb20E494P6Kvy6SOB2U VR7yq74Jf1MWr54EH0YhUvPCcAAKKIXFLdvjVdu0ifhC15WWIQPKYJ0jnVoxuStndf3w TQZ9DxKqZNGIymMrRjclqkZl9t+NEI4z1ns5CAKCOnLwQfZlIgkwjjpP9oPT6CnG3Hjs oIbQBtB1zj9DU8yLXJRevFPBdeVjlFqwORaC8DHgZvVF5d8CivM7I9Q1S/5hUfFEAInS DA0rKyNLvarhpw40X6efFfnw3HEekACkcGFrcLZ7lR4Yrdi5+2RH77gWTdwNG6u/b8kf GdFg== X-Received: by 10.107.155.13 with SMTP id d13mr7850657ioe.29.1429328619949; Fri, 17 Apr 2015 20:43:39 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1301:edfc:ba92:93b2:bbd8]) by mx.google.com with ESMTPSA id e69sm7600726ioe.11.2015.04.17.20.43.38 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 17 Apr 2015 20:43:38 -0700 (PDT) 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-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Charlie Mooney Reviewed-by: Benson Leung --- 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;