diff options
author | Dominik Sliwa <dominik.sliwa@toradex.com> | 2018-06-13 12:10:51 +0200 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2018-06-21 15:45:59 +0200 |
commit | a1bc98487cb26f230f4a52afb31a7d7c59d008c0 (patch) | |
tree | ac1814cdc8677e03e72dcf86acf7af1f375b9d59 /drivers/input/touchscreen/apalis-tk1-k20_ts.c | |
parent | 1319d0d5fd1c5070984917157d03acb7e54a4364 (diff) |
apalis-tk1: mfd: k20: cleanup and fw version 1.1 support
Signed-off-by: Dominik Sliwa <dominik.sliwa@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'drivers/input/touchscreen/apalis-tk1-k20_ts.c')
-rw-r--r-- | drivers/input/touchscreen/apalis-tk1-k20_ts.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/apalis-tk1-k20_ts.c b/drivers/input/touchscreen/apalis-tk1-k20_ts.c index 55aaa6f07fb9..22f55e64328a 100644 --- a/drivers/input/touchscreen/apalis-tk1-k20_ts.c +++ b/drivers/input/touchscreen/apalis-tk1-k20_ts.c @@ -67,7 +67,8 @@ static void apalis_tk1_k20_ts_report_sample(struct apalis_tk1_k20_ts *priv) dev_dbg(&idev->dev, "report (%d, %d, %d)\n", x, y, press); - queue_delayed_work(priv->workq, &priv->work, HZ / 25); + if (priv && priv->workq) + queue_delayed_work(priv->workq, &priv->work, HZ / 25); } else { dev_dbg(&idev->dev, "report release\n"); btn = 0; @@ -201,10 +202,9 @@ static int __exit apalis_tk1_k20_ts_remove(struct platform_device *pdev) { struct apalis_tk1_k20_ts *priv = platform_get_drvdata(pdev); - platform_set_drvdata(pdev, NULL); - destroy_workqueue(priv->workq); input_unregister_device(priv->idev); + platform_set_drvdata(pdev, NULL); kfree(priv); return 0; |