From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937439AbdEWOmp (ORCPT ); Tue, 23 May 2017 10:42:45 -0400 Received: from emcscan.emc.com.tw ([192.72.220.5]:3967 "EHLO emcscan.emc.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968116AbdEWOmj (ORCPT ); Tue, 23 May 2017 10:42:39 -0400 X-Greylist: delayed 674 seconds by postgrey-1.27 at vger.kernel.org; Tue, 23 May 2017 10:42:39 EDT From: KT Liao To: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, dmitry.torokhov@gmail.com Cc: phoenix@emc.com.tw, kt.liao@emc.com.tw Subject: [PATCH] Input: elan_i2c - Prevent breaking of FW updating from unexpected signal Date: Tue, 23 May 2017 22:32:02 +0800 Message-Id: <1495549922-4589-1-git-send-email-kt.liao@emc.com.tw> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use wait_for_completion_timeout to prevent breaking of FW updating from unexpected signal Signed-off-by: KT Liao --- drivers/input/mouse/elan_i2c_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/mouse/elan_i2c_i2c.c b/drivers/input/mouse/elan_i2c_i2c.c index 3be75c6e..34356c7 100644 --- a/drivers/input/mouse/elan_i2c_i2c.c +++ b/drivers/input/mouse/elan_i2c_i2c.c @@ -619,7 +619,7 @@ static int elan_i2c_finish_fw_update(struct i2c_client *client, error = elan_i2c_write_cmd(client, ETP_I2C_STAND_CMD, ETP_I2C_RESET); if (!error) - ret = wait_for_completion_interruptible_timeout(completion, + ret = wait_for_completion_timeout(completion, msecs_to_jiffies(300)); disable_irq(client->irq); -- 2.7.4