aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/charger-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/power/charger-manager.c')
-rw-r--r--drivers/power/charger-manager.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/power/charger-manager.c b/drivers/power/charger-manager.c
index 92dfa5c64876..8a0aca6364c7 100644
--- a/drivers/power/charger-manager.c
+++ b/drivers/power/charger-manager.c
@@ -680,9 +680,8 @@ static void _setup_polling(struct work_struct *work)
680 if (!delayed_work_pending(&cm_monitor_work) || 680 if (!delayed_work_pending(&cm_monitor_work) ||
681 (delayed_work_pending(&cm_monitor_work) && 681 (delayed_work_pending(&cm_monitor_work) &&
682 time_after(next_polling, _next_polling))) { 682 time_after(next_polling, _next_polling))) {
683 cancel_delayed_work_sync(&cm_monitor_work);
684 next_polling = jiffies + polling_jiffy; 683 next_polling = jiffies + polling_jiffy;
685 queue_delayed_work(cm_wq, &cm_monitor_work, polling_jiffy); 684 mod_delayed_work(cm_wq, &cm_monitor_work, polling_jiffy);
686 } 685 }
687 686
688out: 687out:
@@ -717,10 +716,8 @@ static void fullbatt_handler(struct charger_manager *cm)
717 if (cm_suspended) 716 if (cm_suspended)
718 device_set_wakeup_capable(cm->dev, true); 717 device_set_wakeup_capable(cm->dev, true);
719 718
720 if (delayed_work_pending(&cm->fullbatt_vchk_work)) 719 mod_delayed_work(cm_wq, &cm->fullbatt_vchk_work,
721 cancel_delayed_work(&cm->fullbatt_vchk_work); 720 msecs_to_jiffies(desc->fullbatt_vchkdrop_ms));
722 queue_delayed_work(cm_wq, &cm->fullbatt_vchk_work,
723 msecs_to_jiffies(desc->fullbatt_vchkdrop_ms));
724 cm->fullbatt_vchk_jiffies_at = jiffies + msecs_to_jiffies( 721 cm->fullbatt_vchk_jiffies_at = jiffies + msecs_to_jiffies(
725 desc->fullbatt_vchkdrop_ms); 722 desc->fullbatt_vchkdrop_ms);
726 723