summaryrefslogtreecommitdiff
path: root/drivers/misc/m4sensorhub_fusion.c
diff options
context:
space:
mode:
authorJim Wylder <jwylder@motorola.com>2014-08-10 11:25:48 -0500
committerJames Wylder <jwylder@motorola.com>2014-08-10 18:06:44 +0000
commit1783f64df065fd7496bce680485b1c4259fe372f (patch)
tree418e8727c251ce97e17d2b3f7f521900b84392aa /drivers/misc/m4sensorhub_fusion.c
parentaf33de0af5b5803582d572f36a942b031c86540f (diff)
downloadolio-linux-3.10-1783f64df065fd7496bce680485b1c4259fe372f.tar.xz
olio-linux-3.10-1783f64df065fd7496bce680485b1c4259fe372f.zip
IKXCLOCK-3468 m4sensorhub: Use freezable workqueue
The update of the sensorhub to use polling was based on the belief that the workqueue would be frozen before suspend and thawed afterwards. Unfortunately the system_wq used by schedule_delayed_work, is not freezable. Update the changes to use the system_freezable_wq. Change-Id: Ib759664a5bc61dad72207f59d2c8c672cd0f7c9b Signed-off-by: Jim Wylder <jwylder@motorola.com>
Diffstat (limited to 'drivers/misc/m4sensorhub_fusion.c')
-rw-r--r--drivers/misc/m4sensorhub_fusion.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/m4sensorhub_fusion.c b/drivers/misc/m4sensorhub_fusion.c
index f1ce277f2fe..e1330f56263 100644
--- a/drivers/misc/m4sensorhub_fusion.c
+++ b/drivers/misc/m4sensorhub_fusion.c
@@ -133,7 +133,7 @@ static void m4fus_work_func(struct work_struct *work)
*/
iio_push_to_buffers(iio, (unsigned char *)&(dd->iiodat[0]));
if (dd->samplerate > 0)
- schedule_delayed_work(&(dd->m4fus_work),
+ queue_delayed_work(system_freezable_wq, &(dd->m4fus_work),
msecs_to_jiffies(dd->samplerate));
m4fus_isr_fail:
@@ -174,7 +174,7 @@ static int m4fus_set_samplerate(struct iio_dev *iio, int16_t rate)
dd->samplerate = rate;
cancel_delayed_work(&(dd->m4fus_work));
if (dd->samplerate > 0)
- schedule_delayed_work(&(dd->m4fus_work),
+ queue_delayed_work(system_freezable_wq, &(dd->m4fus_work),
msecs_to_jiffies(rate));
m4fus_set_samplerate_fail:
@@ -372,7 +372,7 @@ static void m4fus_panic_restore(struct m4sensorhub_data *m4sensorhub,
cancel_delayed_work(&(dd->m4fus_work));
if (dd->samplerate > 0)
- schedule_delayed_work(&(dd->m4fus_work),
+ queue_delayed_work(system_freezable_wq, &(dd->m4fus_work),
msecs_to_jiffies(dd->samplerate));
mutex_unlock(&(dd->mutex));
}