summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Gamblin <tgamblin@baylibre.com>2024-06-17 09:49:42 -0400
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-06-25 21:04:43 +0100
commit41aea490533c172ed0cd4875198d9f74865fca5d (patch)
tree0b2333def8061ceb35bd3a6427e0aae524bae3ef
parent1b3d0fc286030193f66eabc46d3284994c34770f (diff)
downloadlinux-41aea490533c172ed0cd4875198d9f74865fca5d.tar.gz
linux-41aea490533c172ed0cd4875198d9f74865fca5d.zip
iio: accel: kxsd9: Make use of regmap_clear_bits()
Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20240617-review-v3-2-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r--drivers/iio/accel/kxsd9.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c
index ba99649fe195..70dfd6e354db 100644
--- a/drivers/iio/accel/kxsd9.c
+++ b/drivers/iio/accel/kxsd9.c
@@ -370,10 +370,7 @@ static int kxsd9_power_down(struct kxsd9_state *st)
* make sure we conserve power even if there are others users on the
* regulators.
*/
- ret = regmap_update_bits(st->map,
- KXSD9_REG_CTRL_B,
- KXSD9_CTRL_B_ENABLE,
- 0);
+ ret = regmap_clear_bits(st->map, KXSD9_REG_CTRL_B, KXSD9_CTRL_B_ENABLE);
if (ret)
return ret;