Skip to contentSkip to conversation

power: supply: sgm41542: Use secs_to_jiffies()

PATCH In review Aryan Sinha 1 participant 2 messages Oct 16 Power supply

lore
Share & tools
lore
#0 lore raw

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.

---
 drivers/power/supply/sgm41542_charger.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/power/supply/sgm41542_charger.c +2 -2
index 888096252..118b4c700 100644
@@ -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