diff options
| author | Chunyang Chen <chenchunyang0908@gmail.com> | 2026-03-05 20:43:02 +0800 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2026-03-07 13:17:59 +0000 |
| commit | 6f658d19a5a29a602c372e8cfe8d4a623367d211 (patch) | |
| tree | 3da0c9fd4ea4deff73a4a8212df7b205cdbdd49e /include/linux | |
| parent | d20bbae6e5d408a8a7c2a4344d76dd1ac557a149 (diff) | |
iio: adc: ti-ads1018: fix type overflow for data rate
The variable 'drate' is currently defined as u8. However, the data rate
values in ads1018 can reach up to 3300 Hz, which exceeds the maximum
value of 255 that a u8 can hold.
Change the type of 'drate' to u32 to match the data_rate_mode_to_hz
array definition and ensure the data rate is handled correctly.
Fixes: bf0bba486b5b ("iio: adc: Add ti-ads1018 driver")
Signed-off-by: Chunyang Chen <chenchunyang0908@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Reviewed-by: Kurt Borja <kuurtb@gmail.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
