MLK-22355: mfd: si476x: Use system_freezable_wq instead of system_wq
authorShengjiu Wang <shengjiu.wang@nxp.com>
Sat, 3 Aug 2019 07:54:45 +0000 (15:54 +0800)
committerShengjiu Wang <shengjiu.wang@nxp.com>
Mon, 5 Aug 2019 10:39:00 +0000 (18:39 +0800)
There is issue that system can't enter suspend while the si476x is
working.

The reason is that with the workqueue thread is still working after
i2c enter suspend, then cause the cpu_suspend function failed.

This patch is to use the system_freezable_wq instead of the system_wq,
that the workqueue will be freeze before system enter suspend.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
drivers/mfd/si476x-i2c.c

index 75b6c44..24a7885 100644 (file)
@@ -106,7 +106,7 @@ static int si476x_core_config_pinmux(struct si476x_core *core)
 
 static inline void si476x_core_schedule_polling_work(struct si476x_core *core)
 {
-       schedule_delayed_work(&core->status_monitor,
+       queue_delayed_work(system_freezable_wq, &core->status_monitor,
                              usecs_to_jiffies(SI476X_STATUS_POLL_US));
 }