Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp938761imj; Thu, 7 Feb 2019 14:28:37 -0800 (PST) X-Google-Smtp-Source: AHgI3IZwiZUabc72V2ISN2xHPaHdzPQrOCtycFpOrw32XyEewu4ZppZSFLVWf9M0STuluCdXX6CB X-Received: by 2002:a17:902:e512:: with SMTP id ck18mr5478212plb.46.1549578517099; Thu, 07 Feb 2019 14:28:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549578517; cv=none; d=google.com; s=arc-20160816; b=BJhHhYAriDZwKiu/v1xaLeHX1fz+gQAaEp9abv82QydavXNrMMEJxN2BLtKj2XJE6+ fvnQLg+ylSKPEuYemmlGEK7AcJLcNSvxAjeS0/8SOSxSOj/SehX5PvnolQCxdm73Ihy/ 2mUymWDU4L5F2H0IYPi0updQr51IW0GXgUu7WQokLaD5QsqDExrEEgppPGFv1z5sVjE6 am9Jogp4SYXSJfkRfo9nXBbL/kkGu8n6Hw4y9Y6aTFbBnLtzM7xSdpCuWP+krp4FzGz/ /qseC5+ZXqOPmXifLa4Z7FyNASWvuboa2WPf5caNGl7lMTKERDj3cBL81PZedQyICD6N 3Qng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=lb7ocCcoTVCzqHwnwbLdIJbHy25WuLw1BTbro070VbQ=; b=QLW0QaOXdTOeNzLs6nXHP2SxUbvefOr1fV5nr2LjkP7YVAlw1xvbL7PvSk8O9aDLps HBiLDyufm0JndXOUooBXm5tiFf6Jmra9q6fnFd1j/Wx78wjE0af9EmNKyfTKJe8vDWb9 sJZ8Jaz4HRgCzROJm9k0FjhWvjgOtCqMGQ3aYw/MI0bmKcJk4YHsnWoBAAGT34ILZ1pE YiJzZxEehk4SxWx3zZ6Z91t5pLH+woFeYxKbsRW5g4N4bFao7Uclal0r4LZitZ/w9rQk cb/j7d8/EoXBU5xFKzzrWJu5rItnfivDe8SGSqbXCI2RqXw913HiEHnaxP/7AZszYeY0 dKKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HXSjT1Hk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si200040pgm.250.2019.02.07.14.28.21; Thu, 07 Feb 2019 14:28:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HXSjT1Hk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727041AbfBGW1o (ORCPT + 99 others); Thu, 7 Feb 2019 17:27:44 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:43770 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726642AbfBGW1n (ORCPT ); Thu, 7 Feb 2019 17:27:43 -0500 Received: by mail-pl1-f194.google.com with SMTP id f90so411005plb.10; Thu, 07 Feb 2019 14:27:43 -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=lb7ocCcoTVCzqHwnwbLdIJbHy25WuLw1BTbro070VbQ=; b=HXSjT1HkvYwU4vOsDKPiUM+//gFc/MqvxJXUZHYsi9lBPil04qLGFEeeEpvNu8Zd67 1t1Pr959GHVKGcusbAJXxng/iCM7zvXa54lEMBmtXHepJLcZlKOciZYqV7fnr3tuvcGV e/Z+Ve3RJc9wqxR7bOdfO6hvMg4S1WjD42cGqwdCFVVd6Oe8iZo/RnhZrdL0tRayVaC2 IFUObpcmpojCD2Kw1XiRezEEfrG3guwggLBtL9VbYtNzkmPPHsLHlDp8FZJJr+H2RI6a jhWtDKiE/5Q/lgo3h89WzUY04zLwB0DCsLayLoAawSHEdhBLu32Smqln6NioyCMkHCrT l+/w== 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=lb7ocCcoTVCzqHwnwbLdIJbHy25WuLw1BTbro070VbQ=; b=czQjQKSGxFNhP6AuOK18Hh0eE5VGIJEbtVTflMTI70/eQzpNUi2AOGKN1IU+KUi4/2 /7MT2qHbHxj1YWXQq9JZWtuGX/7AetqUjgegUBaqa7S/2G1LZssaeWKRJaQjyPRwhfrj Wj42mY2sFDBiFTuEpmZlduRnn0XsruEiZsLzxk5zjynZv7gOWEiUsoDfuwAjQcl8NF2S Zk1+ABqanqWzr4/9cNCBO3ht6mInY1snbYIwmhNhxTewbdID+dLMBVI+VjScbGji+ZzF xEuxeU5oHn88ZTdJ1ylQSygPLx8M1773tTOVun7+ukolhH03enOJoNRh/DlqDgjI1sTW OVDA== X-Gm-Message-State: AHQUAubNV1g+Wxe3944c44QodVt6c3g+vkpPo7U78Ba4WzGSSITnYYwW Xg7+N/u96HiN9CkIoCvhpc7tiOA8 X-Received: by 2002:a17:902:be10:: with SMTP id r16mr19100022pls.304.1549578462617; Thu, 07 Feb 2019 14:27:42 -0800 (PST) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id e21sm317746pfh.45.2019.02.07.14.27.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 14:27:41 -0800 (PST) Date: Thu, 7 Feb 2019 14:27:40 -0800 From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Sven Van Asbroeck , Danilo Krummrich , linux-kernel@vger.kernel.org Subject: [PATCH] Input: ps2-gpio - flush TX work when closing port Message-ID: <20190207222740.GA38612@dtor-ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org To ensure that TX work is not running after serio port has been torn down, let's flush it when closing the port. Reported-by: Sven Van Asbroeck Signed-off-by: Dmitry Torokhov --- drivers/input/serio/ps2-gpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/serio/ps2-gpio.c b/drivers/input/serio/ps2-gpio.c index c62cceb97bb1..9e1dbde2e15b 100644 --- a/drivers/input/serio/ps2-gpio.c +++ b/drivers/input/serio/ps2-gpio.c @@ -76,6 +76,7 @@ static void ps2_gpio_close(struct serio *serio) { struct ps2_gpio_data *drvdata = serio->port_data; + flush_work(&drvdata->tx_work.work); disable_irq(drvdata->irq); } -- 2.20.1.611.gfbb209baf1-goog -- Dmitry