Skip to content

Commit

Permalink
Input: ps2-gpio - flush TX work when closing port
Browse files Browse the repository at this point in the history
[ Upstream commit 33a841c ]

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 <thesven73@gmail.com>
Acked-by: Danilo Krummrich <danilokrummrich@dk-develop.de>
Reviewed-by: Sven Van Asbroeck <TheSven73@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
dtor authored and gregkh committed Mar 23, 2019
1 parent 4fe714b commit e91dc20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/input/serio/ps2-gpio.c
Expand Up @@ -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);
}

Expand Down

0 comments on commit e91dc20

Please sign in to comment.