From patchwork Thu Feb 7 22:46:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 10802249 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 27FD26C2 for ; Thu, 7 Feb 2019 22:46:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 125E02D4F9 for ; Thu, 7 Feb 2019 22:46:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 063DD2DDFF; Thu, 7 Feb 2019 22:46:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ACB332D4F9 for ; Thu, 7 Feb 2019 22:46:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726650AbfBGWqy (ORCPT ); Thu, 7 Feb 2019 17:46:54 -0500 Received: from mail-pl1-f193.google.com ([209.85.214.193]:40857 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726622AbfBGWqy (ORCPT ); Thu, 7 Feb 2019 17:46:54 -0500 Received: by mail-pl1-f193.google.com with SMTP id u18so677936plq.7; Thu, 07 Feb 2019 14:46:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=bRm+DeA+dYc+/LF/LLY2nCch+/hS6OI43ZsdtxjCS1o=; b=bybu+W6uLpYGRUybaiK1kYRLb9qnEC9cVhKFKyrWfJvOwAyhYT7AQAXvEnKT1QNkXZ jl6UXNnb/RroTNsSG+P7UIzch0HGQw8OQAR5CexAmk4PUomPAge7f72hZU/+IuTkZCuY N2beFUdePeMciapL/Wyg70qaqHT92MunZP4+iO0a50RWQuKjB8dba2KBaFbGDA0yOavY anMlD0SFS5PKp5wEWFfd0vIayTjU4tICWkJYPgDonJnX2kY1pYw8QxD4GtEdb210LzmG 1ck2eo9zNcFbdKTjKrZkBOaiMdjQPNiuQc8gZb786mWiHlv2QA4yxtLlNOKSsOKQbe5P hj6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=bRm+DeA+dYc+/LF/LLY2nCch+/hS6OI43ZsdtxjCS1o=; b=W4YcIJTJhozxsivoAASjdRAiWQM+awT7VXzgNPr64kPQJJBBWiI/5DIzOx2sTiaslM KA91Go7BTWkU3bWwycAudTm4wU7AKUes/wZByZftFmA3hQdtwUf5x37AtuFT5wTlhZjk UIRolAkqQLHS3YvjOqDKfWgSCsWdRu+gpAU2CQEpAlsrXMfBRZ2aUSa5Mc9yzp/Tsc46 fEG6Poi7zO/dWhp8fVnajPhatfH+If+hiuUA3pDV7n1Y36eK4MJzuPNgCXc8U4mBw//4 nEMyZb41J1G4HLHv9Zfww0rV9w1+R+eEX8J6X9VP9eKxp30CQKqBvPsWRpu5HAhXYrxr 9FOA== X-Gm-Message-State: AHQUAubuii9IWuqvMh0tyn/pOnhFcf8rm8c9vBQ1JdtWaptwojh1TOsn EHDpnqyWKAuNGeI8bQpBVItDyz6c X-Google-Smtp-Source: AHgI3IbDFp08RYf0wkR3b1vuaXvFedrzV3+Jt8yYKxZS+Q/UHrFFHwXmVnng74YY0WGFpJMGQYY0qg== X-Received: by 2002:a17:902:bc83:: with SMTP id bb3mr4212176plb.266.1549579612814; Thu, 07 Feb 2019 14:46:52 -0800 (PST) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id r12sm154975pgv.83.2019.02.07.14.46.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 14:46:52 -0800 (PST) Date: Thu, 7 Feb 2019 14:46:50 -0800 From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Sven Van Asbroeck , tj@kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: matrix_keypad - use flush_delayed_work() Message-ID: <20190207224650.GA49861@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We should be using flush_delayed_work() instead of flush_work() in matrix_keypad_stop() to ensure that we are not missing work that is scheduled but not yet put in the workqueue (i.e. its delay timer has not expired yet). Signed-off-by: Dmitry Torokhov Reviewed-by: Sven Van Asbroeck --- drivers/input/keyboard/matrix_keypad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c index 403452ef00e6..3d1cb7bf5e35 100644 --- a/drivers/input/keyboard/matrix_keypad.c +++ b/drivers/input/keyboard/matrix_keypad.c @@ -222,7 +222,7 @@ static void matrix_keypad_stop(struct input_dev *dev) keypad->stopped = true; spin_unlock_irq(&keypad->lock); - flush_work(&keypad->work.work); + flush_delayed_work(&keypad->work); /* * matrix_keypad_scan() will leave IRQs enabled; * we should disable them now.