diff options
author | Trevor Gamblin <tgamblin@baylibre.com> | 2024-06-17 09:50:00 -0400 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2024-06-25 21:04:46 +0100 |
commit | c1cf171365dcf383042cbea3e1c3475375c1e496 (patch) | |
tree | b2cdf9b8f1d88b5a804886fb8a89274d71e6a439 /drivers/iio/dac/stm32-dac-core.c | |
parent | 090510b902d9e474085989b32cdc8a6260a1ad13 (diff) |
iio: dac: stm32-dac-core: make use of regmap_set_bits()
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240617-review-v3-20-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/dac/stm32-dac-core.c')
-rw-r--r-- | drivers/iio/dac/stm32-dac-core.c | 5 |
1 files 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; } |