mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-02-15 04:42:02 +00:00
31 lines
1,012 B
Diff
31 lines
1,012 B
Diff
From 0afb5e98488aed7017b9bf321b575d0177feb7ed Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
Date: Sat, 1 Apr 2023 11:50:07 +0100
|
|
Subject: [PATCH 717/726] fixup! gpio-fsm: Avoid truncation of delay jiffies
|
|
|
|
The kernel's time unit of jiffies should be stored as an unsigned long
|
|
value. Storing it as an unsigned int, as gpio-fsm did, leads to
|
|
truncation and malfunction when the kernel is built for a 64-bit
|
|
platform.
|
|
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
---
|
|
drivers/gpio/gpio-fsm.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/drivers/gpio/gpio-fsm.c b/drivers/gpio/gpio-fsm.c
|
|
index 3a348f1c6514..b708953c59f8 100644
|
|
--- a/drivers/gpio/gpio-fsm.c
|
|
+++ b/drivers/gpio/gpio-fsm.c
|
|
@@ -121,7 +121,7 @@ struct gpio_fsm {
|
|
struct fsm_state *current_state;
|
|
struct fsm_state *next_state;
|
|
struct fsm_state *delay_target_state;
|
|
- unsigned int delay_jiffies;
|
|
+ unsigned long delay_jiffies;
|
|
int delay_ms;
|
|
unsigned int debug;
|
|
bool shutting_down;
|
|
--
|
|
2.33.1
|
|
|