power: supply: sgm41542: Use secs_to_jiffies()
PATCH 1/1 power: supply: sgm41542: Use secs_to_jiffies()
Both watchdog kicks are a flat five seconds written the long way. Use secs_to_jiffies() from the same header instead.
Signed-off-by Aryan Sinha <[email protected]>
--- drivers/power/supply/sgm41542_charger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/power/supply/sgm41542_charger.c +2 -2
@@ -468,7 +468,7 @@ static int sgm4154x_set_watchdog_timer(struct sgm4154x_device *sgm, u8 time)if (!sgm->watchdog_enable)queue_delayed_work (sgm->sgm_monitor_wq, &sgm->sgm_delay_work, -msecs_to_jiffies (1000 *5 )); +secs_to_jiffies (5 )); sgm->watchdog_enable = true; }else { sgm->watchdog_enable = false;
@@ -970,7 +970,7 @@ static void sgm_charger_work(struct work_struct *work)if (sgm->watchdog_enable)queue_delayed_work (sgm->sgm_monitor_wq, &sgm->sgm_delay_work, -msecs_to_jiffies (1000 *5 )); +secs_to_jiffies (5 )); }static void sgm4154x_disable_irq_wake (void *data)
Signature · 1 line
2.46.0
This is an accidental resend of a patch I already posted on 12 Oct, with nothing changed between the two:
https://lore.kernel.org/all/[email protected]/
Please drop this copy and use the original. Sorry for the duplication.
Aryan