From: Dmitry Torokhov Date: Thu, 7 Feb 2019 22:22:42 +0000 (-0800) Subject: Input: ps2-gpio - flush TX work when closing port X-Git-Tag: v4.14.108~161 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=fd922f641e5c452931f86c887fd32ba883b3233c;p=users%2Fjedix%2Flinux-maple.git Input: ps2-gpio - flush TX work when closing port [ Upstream commit 33a841ce5cef4ca6c18ad333248b6d273f54c839 ] 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 Acked-by: Danilo Krummrich Reviewed-by: Sven Van Asbroeck Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- diff --git a/drivers/input/serio/ps2-gpio.c b/drivers/input/serio/ps2-gpio.c index b50e3817f3c4..4a64ab30589c 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_delayed_work(&drvdata->tx_work); disable_irq(drvdata->irq); }