Skip to contentSkip to conversation

power: supply: sgm41542: Use secs_to_jiffies()

PATCH Applied Aryan Sinha 2 participants 2 messages Oct 12 – Nov 9 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
#1 lore raw
Quoted 2 lines · Aryan Sinha

Both watchdog kicks are a flat five seconds written the long way. Use secs_to_jiffies() from the same header instead.

Applied, thanks!

[1/1] power: supply: sgm41542: Use secs_to_jiffies()

      commit: f7902a97d9b968a1731d0c6573aafd1de80e9043

Best regards,

Signature · 1 line
Sebastian Reichel <[email protected]>