mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 05:55:44 +02:00
clk: renesas: rzv2h: Simplify polling condition in __rzv2h_cpg_assert()
Replace the ternary operator with a direct boolean comparison to improve code readability and maintainability. The logic remains unchanged. Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/20250903082757.115778-5-tommaso.merciai.xr@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
This commit is contained in:
parent
f8c002165c
commit
08eea73dcf
|
|
@ -867,8 +867,7 @@ static int __rzv2h_cpg_assert(struct reset_controller_dev *rcdev,
|
|||
mask = BIT(monbit);
|
||||
|
||||
ret = readl_poll_timeout_atomic(priv->base + reg, value,
|
||||
assert ? (value & mask) : !(value & mask),
|
||||
10, 200);
|
||||
assert == !!(value & mask), 10, 200);
|
||||
if (ret && !assert) {
|
||||
value = mask << 16;
|
||||
writel(value, priv->base + GET_RST_OFFSET(priv->resets[id].reset_index));
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user