From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09E3EC4360F for ; Fri, 22 Mar 2019 11:40:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CE84A218B0 for ; Fri, 22 Mar 2019 11:39:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553254799; bh=FevHOG6SwR3Puy3FZ5iM7/YaNZ5Mc/xTvP7wHFUqh4k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=t3WZq6xspbLqf4pAvZA90N63NOK0an3VWZ60jHRoykGt9BtFbgY7ct0KskCyr43Ba H1OOUSTBAiy7CVWTyPVJqlPlBMSyAekb3GPc2NbiJ9oXkcxow8TDwq6Lw2x9I9POe0 ZqZzRemKdRIxfzAY15Acjlea8+kXFMekpw3JBD3Q= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730964AbfCVLj6 (ORCPT ); Fri, 22 Mar 2019 07:39:58 -0400 Received: from mail.kernel.org ([198.145.29.99]:41738 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730901AbfCVLj4 (ORCPT ); Fri, 22 Mar 2019 07:39:56 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C80952082C; Fri, 22 Mar 2019 11:39:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553254796; bh=FevHOG6SwR3Puy3FZ5iM7/YaNZ5Mc/xTvP7wHFUqh4k=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vvfJrUxOCcTHBaduRM+IKx9mSlJESQgt5rTLX9h87aNovkO+4N8na7Gh7f081OEYn Gf7eg6GR2TJUfMcaNIO0a8C3AfuC6xjolIohLLoN56Wpx1FXY0COHD0lbf8pKChFeG SVsCbe4pa0hKJVy2euz0w+8THVOK1fSylKXNU01M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Torokhov , Sasha Levin Subject: [PATCH 4.9 014/118] Input: matrix_keypad - use flush_delayed_work() Date: Fri, 22 Mar 2019 12:14:46 +0100 Message-Id: <20190322111216.998499378@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190322111215.873964544@linuxfoundation.org> References: <20190322111215.873964544@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit a342083abe576db43594a32d458a61fa81f7cb32 ] 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 Signed-off-by: Sasha Levin --- 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 c64d87442a62..2e12e31f45c5 100644 --- a/drivers/input/keyboard/matrix_keypad.c +++ b/drivers/input/keyboard/matrix_keypad.c @@ -220,7 +220,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. -- 2.19.1