mfd: rz-mtu3: Reduce critical sections
authorBiju Das <biju.das.jz@bp.renesas.com>
Tue, 15 Aug 2023 07:34:44 +0000 (08:34 +0100)
committerLee Jones <lee@kernel.org>
Tue, 22 Aug 2023 07:07:52 +0000 (08:07 +0100)
commita160d1286b5907603a5d4329f6047709bc423480
treecb5548b5b19cf13a51c03151d09d1afa037c87ad
parent367124ebb359539fe237899abc6a9c78c6f793b6
mfd: rz-mtu3: Reduce critical sections

Reduce critical sections on rz_mtu3_start_stop_ch() and
rz_mtu3_is_enabled() by moving offset and bitpos computation
outside the critical section and drop the 'ret' variable on
rz_mtu3_is_enabled() and return 'tstr & BIT(bitpos)' directly.

Reported-by: Pavel Machek <pavel@denx.de>
Closes: https://lore.kernel.org/all/ZIMAse1ikTuycJ02@duo.ucw.cz/
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Pavel Machek <pavel@denx.de>
Link: https://lore.kernel.org/r/20230815073445.9579-2-biju.das.jz@bp.renesas.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/mfd/rz-mtu3.c