Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp1829788imj; Fri, 8 Feb 2019 08:03:01 -0800 (PST) X-Google-Smtp-Source: AHgI3IaT6xzkrpapXn1HHnTNwjH0Td2uPVLwwtUAx466x0jnz1gzirQ94anLsH2zJVPGmTgR560q X-Received: by 2002:a63:9751:: with SMTP id d17mr20348871pgo.392.1549641781512; Fri, 08 Feb 2019 08:03:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549641781; cv=none; d=google.com; s=arc-20160816; b=U52yT+XUgphQYGEUxIPKIrgxF2EDkQzSeZhXL7UOlS8Z2oSuRFvSy4YAr3xpyS80Bs x5mfdS2IgdYtEwzERB1Ht+CCp93+uubKIOXp57z2qB7ubnLhC4hs4RtzXobJssMBiAkY o7zHhgmeh1uPFxeIW0KBQE9JqReKTs3HdcdEHVNxWQgTylhf0FqZYTAz/zGyCqyYFmUs MkOH4WwMOzGWoTnV0vkQvjFjIEzfNYP/Je0ok6SD+Vc6YvB8uxTnsp54B0zEdE60MlI9 xpml8COf+FWdNKw4ioIEQkrOhhet9npaDhp2Uwvpcr/b5HBw8YjyC4JLXHt47pEr11Qr Gtuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version; bh=VveQHgLjebMivBEn24ZCOuPPoxy+vPEsH5P09GCyuIY=; b=HDIANAoPQBD9CcwBqt3kKq/RUQDcyx8SISD9zSCefno0dWgplrfXOjG06TLMCq1Hbj AN3KZDlWOVextD1PDOdmrq041zbGyu1AChihkfIYmhAc/H0FR5bwe99xYXtfz41h2xQN rsdlZjb3+Hb4jR1EleksBPqmuHjtghwwJatvK7CRGlbaivFjiYasOgGxQgAgBP+QeTOf AxC9BQvoATJ2g6bT92O5B9sqC8c2HXBY+Ce+ZOfmRU81ss4hgGP4luDDJZ3HyyttcOGJ EQdLn78fT8RCXGgBMH+RfeVOPG3u6SWJEEU3woWn9x6JTYB4RKt0ZJxLhpvMvqvGzQG0 mhYQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f6si2042162pgd.362.2019.02.08.08.02.43; Fri, 08 Feb 2019 08:03:01 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727561AbfBHQAs (ORCPT + 99 others); Fri, 8 Feb 2019 11:00:48 -0500 Received: from hs01.dk-develop.de ([173.249.23.66]:35828 "EHLO hs01.dk-develop.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726869AbfBHQAs (ORCPT ); Fri, 8 Feb 2019 11:00:48 -0500 X-Greylist: delayed 534 seconds by postgrey-1.27 at vger.kernel.org; Fri, 08 Feb 2019 11:00:47 EST Received: from mail.dk-develop.de (hs01.dk-develop.de [IPv6:::1]) by hs01.dk-develop.de (Postfix) with ESMTP id CE9CE1DFEFA; Fri, 8 Feb 2019 16:51:53 +0100 (CET) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 08 Feb 2019 16:51:53 +0100 From: Danilo Krummrich To: Dmitry Torokhov Cc: Sven Van Asbroeck , linux-input@vger.kernel.org, Linux Kernel Mailing List Subject: Re: [PATCH] Input: ps2-gpio - flush TX work when closing port In-Reply-To: <20190208073102.GA31622@dtor-ws> References: <20190207222740.GA38612@dtor-ws> <20190208073102.GA31622@dtor-ws> Message-ID: X-Sender: danilokrummrich@dk-develop.de User-Agent: Roundcube Webmail/1.3.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019-02-08 08:31, Dmitry Torokhov wrote: > On Thu, Feb 07, 2019 at 06:03:03PM -0500, Sven Van Asbroeck wrote: >> On Thu, Feb 7, 2019 at 5:27 PM Dmitry Torokhov >> wrote: >> > >> > + flush_work(&drvdata->tx_work.work); >> >> Would cancel_work_sync() be better than flush_work() ? > > No, because we want to have interrupt and gpios in a consistent state. > If we cancel then we need to see if we should disable it or it may > already be disabled, etc. This way we know it is enabled after > flush_delayed_work() returns, and we need to disable it. > > Thanks. I agree with Dmitry - thanks for the fix. Acked-by: Danilo Krummrich