mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
iio: accel: msa311: 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> Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20240617-review-v3-3-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
41aea49053
commit
4ed403d823
|
|
@ -1034,10 +1034,10 @@ static int msa311_chip_init(struct msa311_priv *msa311)
|
|||
"failed to unmap map0/map1 interrupts\n");
|
||||
|
||||
/* Disable all axes by default */
|
||||
err = regmap_update_bits(msa311->regs, MSA311_ODR_REG,
|
||||
MSA311_GENMASK(F_X_AXIS_DIS) |
|
||||
MSA311_GENMASK(F_Y_AXIS_DIS) |
|
||||
MSA311_GENMASK(F_Z_AXIS_DIS), 0);
|
||||
err = regmap_clear_bits(msa311->regs, MSA311_ODR_REG,
|
||||
MSA311_GENMASK(F_X_AXIS_DIS) |
|
||||
MSA311_GENMASK(F_Y_AXIS_DIS) |
|
||||
MSA311_GENMASK(F_Z_AXIS_DIS));
|
||||
if (err)
|
||||
return dev_err_probe(dev, err, "can't enable all axes\n");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user