[PATCH v3 20/41] iio: dac: stm32-dac-core: make use of regmap_set_bits()
Trevor Gamblin
tgamblin at baylibre.com
Mon Jun 17 06:50:00 PDT 2024
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig at baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin at baylibre.com>
---
drivers/iio/dac/stm32-dac-core.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/dac/stm32-dac-core.c b/drivers/iio/dac/stm32-dac-core.c
index e150ac729154..2d567073996b 100644
--- a/drivers/iio/dac/stm32-dac-core.c
+++ b/drivers/iio/dac/stm32-dac-core.c
@@ -200,9 +200,8 @@ static int stm32_dac_core_resume(struct device *dev)
if (priv->common.hfsel) {
/* restore hfsel (maybe lost under low power state) */
- ret = regmap_update_bits(priv->common.regmap, STM32_DAC_CR,
- STM32H7_DAC_CR_HFSEL,
- STM32H7_DAC_CR_HFSEL);
+ ret = regmap_set_bits(priv->common.regmap, STM32_DAC_CR,
+ STM32H7_DAC_CR_HFSEL);
if (ret)
return ret;
}
--
2.45.2
More information about the linux-arm-kernel
mailing list