diff options
| author | Lothar Rubusch | 2025-06-10 21:59:28 +0000 |
|---|---|---|
| committer | Jonathan Cameron | 2025-06-26 19:32:55 +0100 |
| commit | e564c05401ca59448b7618ab11a86d223bf072d2 (patch) | |
| tree | 6198b50fa76495160e495d5b1d30c23cb92330b4 /drivers | |
| parent | f7f905f7a7eca0586b70dfae1ccf48ebe2f6495e (diff) | |
iio: accel: adxl345: replace magic numbers by unit expressions
Replace absolute numbers by their expressions from units.h to avoid
using magic numbers. Use uniform expressions to clarify their usage.
This is a refactoring change and should not impact functionality.
Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
Link: https://patch.msgid.link/20250610215933.84795-7-l.rubusch@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/iio/accel/adxl345_core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/accel/adxl345_core.c b/drivers/iio/accel/adxl345_core.c index e7c01bb154bf..45d71940c5ac 100644 --- a/drivers/iio/accel/adxl345_core.c +++ b/drivers/iio/accel/adxl345_core.c @@ -708,15 +708,15 @@ static int adxl345_read_event_value(struct iio_dev *indio_dev, return IIO_VAL_INT; case IIO_EV_INFO_TIMEOUT: *val = st->tap_duration_us; - *val2 = 1000000; + *val2 = MICRO; return IIO_VAL_FRACTIONAL; case IIO_EV_INFO_RESET_TIMEOUT: *val = st->tap_window_us; - *val2 = 1000000; + *val2 = MICRO; return IIO_VAL_FRACTIONAL; case IIO_EV_INFO_TAP2_MIN_DELAY: *val = st->tap_latent_us; - *val2 = 1000000; + *val2 = MICRO; return IIO_VAL_FRACTIONAL; default: return -EINVAL; |
