[PATCH v4 2/3] iio: light: stk3310: Replace uint32_t with u32 and reorder members to eliminate padding
From: Miao Li
Date: Sun May 03 2026 - 23:05:55 EST
From: Miao Li <limiao@xxxxxxxxxx>
Replace the uint32_t type members in the stk3310_data structure with u32
to adhere to the unified kernel coding style, and reorder the member
variables to eliminate memory padding holes.
Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
Signed-off-by: Miao Li <limiao@xxxxxxxxxx>
---
drivers/iio/light/stk3310.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c
index 86cc6e8ec..0447fbf1b 100644
--- a/drivers/iio/light/stk3310.c
+++ b/drivers/iio/light/stk3310.c
@@ -115,12 +115,6 @@ static const int stk3310_it_table[][2] = {
struct stk3310_data {
struct i2c_client *client;
struct mutex lock;
- bool als_enabled;
- bool ps_enabled;
- bool ps_int_enabled;
- uint32_t ps_thdl;
- uint32_t ps_thdh;
- uint32_t ps_near_level;
u64 timestamp;
struct regmap *regmap;
struct regmap_field *reg_state;
@@ -131,6 +125,12 @@ struct stk3310_data {
struct regmap_field *reg_int_ps;
struct regmap_field *reg_flag_psint;
struct regmap_field *reg_flag_nf;
+ u32 ps_thdl;
+ u32 ps_thdh;
+ u32 ps_near_level;
+ bool als_enabled;
+ bool ps_enabled;
+ bool ps_int_enabled;
};
static const struct iio_event_spec stk3310_events[] = {
--
2.25.1