diff options
author | Tom Rini <trini@konsulko.com> | 2025-10-06 13:20:24 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-10-06 13:20:24 -0600 |
commit | 0eaa4b337336dbbe93395d1f2ccc18937eaafea2 (patch) | |
tree | c01e661d69181dceca68f56a4849a9bd04608521 /drivers/adc/meson-saradc.c | |
parent | e50b1e8715011def8aff1588081a2649a2c6cd47 (diff) | |
parent | 4e4a9de31de2a5f395ee25c59e4026422fbcb27e (diff) |
Merge branch 'next'
Merge the outstanding changes from the 'next' branch to master.
Diffstat (limited to 'drivers/adc/meson-saradc.c')
-rw-r--r-- | drivers/adc/meson-saradc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/adc/meson-saradc.c b/drivers/adc/meson-saradc.c index 60e348968fb..0144ff828c5 100644 --- a/drivers/adc/meson-saradc.c +++ b/drivers/adc/meson-saradc.c @@ -205,9 +205,9 @@ static int meson_saradc_lock(struct meson_saradc_priv *priv) do { udelay(1); regmap_read(priv->regmap, MESON_SAR_ADC_DELAY, &val); - } while (val & MESON_SAR_ADC_DELAY_BL30_BUSY && timeout--); + } while (val & MESON_SAR_ADC_DELAY_BL30_BUSY && --timeout); - if (timeout < 0) { + if (!timeout) { printf("Timeout while waiting for BL30 unlock\n"); return -ETIMEDOUT; } @@ -256,9 +256,9 @@ static int meson_saradc_wait_busy_clear(struct meson_saradc_priv *priv) do { udelay(1); regmap_read(priv->regmap, MESON_SAR_ADC_REG0, ®val); - } while (FIELD_GET(MESON_SAR_ADC_REG0_BUSY_MASK, regval) && timeout--); + } while (FIELD_GET(MESON_SAR_ADC_REG0_BUSY_MASK, regval) && --timeout); - if (timeout < 0) + if (!timeout) return -ETIMEDOUT; return 0; |