summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorSang-Hun Lee <sanlee@nvidia.com>2014-06-09 18:45:38 -0400
committerRiham Haidar <rhaidar@nvidia.com>2014-06-13 11:54:51 -0700
commitf63af1fbad39f882d1fa3c2126fb96e14bf3702f (patch)
tree4f717153d3d8015e8a497c226380c5f7404a7639 /drivers/staging
parent91597a6a376f7cc6a69b447c69e168581142b41c (diff)
staging: iio: light: iqs253: cancel workqueue
- Any lingering workqueue must be cancelled during the shutdown, to prevent them from running during a shutdown - In most cases, they are harmless, but they will trigger a warning if the i2c bus is shutdown during the shutdown as done on some platforms Bug 1522172 Change-Id: I465e19ef793cf72f5f533b0e2c9e9f3e837c2133 Signed-off-by: Sang-Hun Lee <sanlee@nvidia.com> Reviewed-on: http://git-master/r/421345 (cherry picked from commit b04ebe7fc2a77897b0020412f2a1ab0de94aa7c1) Reviewed-on: http://git-master/r/422776 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Kerwin Wan <kerwinw@nvidia.com> Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/iio/light/iqs253.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/iio/light/iqs253.c b/drivers/staging/iio/light/iqs253.c
index ea7480105a34..d080b930cff0 100644
--- a/drivers/staging/iio/light/iqs253.c
+++ b/drivers/staging/iio/light/iqs253.c
@@ -820,6 +820,15 @@ static int iqs253_remove(struct i2c_client *client)
static void iqs253_shutdown(struct i2c_client *client)
{
+ struct iio_dev *indio_dev = i2c_get_clientdata(client);
+ struct iqs253_chip *chip = iio_priv(indio_dev);
+
+#if !defined(CONFIG_SENSORS_IQS253_AS_PROXIMITY)
+ if (chip->sar_wq)
+ cancel_delayed_work_sync(&chip->sar_dw);
+#endif
+ if (chip->wq)
+ cancel_delayed_work_sync(&chip->dw);
}