[PATCH v5 3/9] pwm: rzg2l-gpt: Drop unused rzg2l_gpt_chip parameter from rzg2l_gpt_calculate_prescale()
From: Biju
Date: Mon Apr 20 2026 - 06:44:44 EST
From: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
The rzg2l_gpt parameter was passed to rzg2l_gpt_calculate_prescale() but
never used inside the function. Remove it and update the sole call site
accordingly.
Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
---
v5:
* New patch.
---
drivers/pwm/pwm-rzg2l-gpt.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-rzg2l-gpt.c b/drivers/pwm/pwm-rzg2l-gpt.c
index 71ae2f891fd2..659044fa3d2f 100644
--- a/drivers/pwm/pwm-rzg2l-gpt.c
+++ b/drivers/pwm/pwm-rzg2l-gpt.c
@@ -132,8 +132,7 @@ static void rzg2l_gpt_modify(struct rzg2l_gpt_chip *rzg2l_gpt, u32 reg, u32 clr,
(rzg2l_gpt_read(rzg2l_gpt, reg) & ~clr) | set);
}
-static u8 rzg2l_gpt_calculate_prescale(struct rzg2l_gpt_chip *rzg2l_gpt,
- u64 period_ticks)
+static u8 rzg2l_gpt_calculate_prescale(u64 period_ticks)
{
u32 prescaled_period_ticks;
u8 prescale;
@@ -300,7 +299,7 @@ static int rzg2l_gpt_config(struct pwm_chip *chip, struct pwm_device *pwm,
}
}
- prescale = rzg2l_gpt_calculate_prescale(rzg2l_gpt, period_ticks);
+ prescale = rzg2l_gpt_calculate_prescale(period_ticks);
pv = rzg2l_gpt_calculate_pv_or_dc(period_ticks, prescale);
duty_ticks = mul_u64_u64_div_u64(state->duty_cycle, rzg2l_gpt->rate_khz, USEC_PER_SEC);
--
2.43.0