[PATCH 7/8] reset: zynq: Use regmap_test_bits in zynq_reset_status
Philipp Zabel
p.zabel at pengutronix.de
Tue Nov 3 06:51:27 PST 2026
Simplify zynq_reset_status() by using regmap_test_bits().
No functional change.
Signed-off-by: Philipp Zabel <p.zabel at pengutronix.de>
---
drivers/reset/reset-zynq.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/reset/reset-zynq.c b/drivers/reset/reset-zynq.c
index 688b512882ec..b7a0445aafcf 100644
--- a/drivers/reset/reset-zynq.c
+++ b/drivers/reset/reset-zynq.c
@@ -67,17 +67,11 @@ static int zynq_reset_status(struct reset_controller_dev *rcdev,
int bank = id / BITS_PER_LONG;
int offset = id % BITS_PER_LONG;
- int ret;
- u32 reg;
pr_debug("%s: %s reset bank %u offset %u\n", KBUILD_MODNAME, __func__,
bank, offset);
- ret = regmap_read(priv->slcr, priv->offset + (bank * 4), ®);
- if (ret)
- return ret;
-
- return !!(reg & BIT(offset));
+ return regmap_test_bits(priv->slcr, priv->offset + (bank * 4), BIT(offset));
}
static const struct reset_control_ops zynq_reset_ops = {
--
2.47.3
More information about the linux-riscv
mailing list