]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
pwm: rzg2l-gpt: Fix period_ticks type from u32 to u64
authorBiju Das <biju.das.jz@bp.renesas.com>
Thu, 4 Jun 2026 09:56:31 +0000 (10:56 +0100)
committerUwe Kleine-König <ukleinek@kernel.org>
Tue, 9 Jun 2026 13:39:11 +0000 (15:39 +0200)
period_ticks is used to store PWM period values that can exceed the 32-bit
range, so change its type from u32 to u64 to prevent overflow.

Cc: stable@kernel.org
Fixes: 061f087f5d0b ("pwm: Add support for RZ/G2L GPT")
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/20260604095647.108654-2-biju.das.jz@bp.renesas.com
Signed-off-by: Uwe Kleine-König <ukleinek@kernel.org>
drivers/pwm/pwm-rzg2l-gpt.c

index 4856af080e8e9fede81a7d07dfe580527d7c7303..c9dfa59bc1ead5bed584f2f5d33792b0c9be9993 100644 (file)
@@ -81,7 +81,7 @@ struct rzg2l_gpt_chip {
        void __iomem *mmio;
        struct mutex lock; /* lock to protect shared channel resources */
        unsigned long rate_khz;
-       u32 period_ticks[RZG2L_MAX_HW_CHANNELS];
+       u64 period_ticks[RZG2L_MAX_HW_CHANNELS];
        u32 channel_request_count[RZG2L_MAX_HW_CHANNELS];
        u32 channel_enable_count[RZG2L_MAX_HW_CHANNELS];
 };