iio: light: st_uvis25_core: make use of regmap_clear_bits()
authorTrevor Gamblin <tgamblin@baylibre.com>
Mon, 17 Jun 2024 13:50:11 +0000 (09:50 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 25 Jun 2024 20:04:47 +0000 (21:04 +0100)
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>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240617-review-v3-31-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/st_uvis25_core.c

index d4e17079b2f43a9e45f5c21faee0bbea7ebb0977..fba3997574bbf4620f2826be1e34ddd26675c17a 100644 (file)
@@ -330,8 +330,8 @@ static int st_uvis25_suspend(struct device *dev)
        struct iio_dev *iio_dev = dev_get_drvdata(dev);
        struct st_uvis25_hw *hw = iio_priv(iio_dev);
 
-       return regmap_update_bits(hw->regmap, ST_UVIS25_REG_CTRL1_ADDR,
-                                 ST_UVIS25_REG_ODR_MASK, 0);
+       return regmap_clear_bits(hw->regmap, ST_UVIS25_REG_CTRL1_ADDR,
+                                ST_UVIS25_REG_ODR_MASK);
 }
 
 static int st_uvis25_resume(struct device *dev)