  	}
  }
  
--inline u32 litex_get_reg(void __iomem *reg, u32 reg_size)
-+static inline u32 litex_get_reg(void __iomem *reg, u32 reg_size)
- {
- 	u32 shifted_data, shift, i;
+@@ -41,7 +57,7 @@ static inline u32 litex_get_reg(void __iomem *reg, u32 reg_size)
  	u32 result = 0;
  
  	for (i = 0; i < reg_size; ++i) {

index 278295eaa..e7c8f8930 100644
--- a/include/linux/litex.h
+++ b/include/linux/litex.h
@@ -10,42 +10,57 @@
 #define LITEX_SUBREG_SIZE          0x1
 #define LITEX_SUBREG_SIZE_BIT      (LITEX_SUBREG_SIZE * 8)
 

 		shift = ((reg_size - i - 1) * LITEX_SUBREG_SIZE_BIT);
 		result |= (shifted_data << shift);
 	}
