diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-01-26 16:53:51 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-01-30 15:21:25 +0300 |
commit | 84cd574e2eb9711ecb933d6a57b585df343be272 (patch) | |
tree | 87a47c22ecaac01c5c5ef19d6ab238347711fdcc /drivers/iio/adc | |
parent | e820a33748b5e22cecafddf919a7d8679949deb1 (diff) | |
download | linux-84cd574e2eb9711ecb933d6a57b585df343be272.tar.xz |
iio: adc: rn5t618: Re-use generic struct u16_fract
Instead of custom data type re-use generic struct u16_fract.
No changes intended.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220126135353.24007-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r-- | drivers/iio/adc/rn5t618-adc.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/iio/adc/rn5t618-adc.c b/drivers/iio/adc/rn5t618-adc.c index 7d891b4ea461..6bf32907f01d 100644 --- a/drivers/iio/adc/rn5t618-adc.c +++ b/drivers/iio/adc/rn5t618-adc.c @@ -42,11 +42,6 @@ struct rn5t618_adc_data { int irq; }; -struct rn5t618_channel_ratios { - u16 numerator; - u16 denominator; -}; - enum rn5t618_channels { LIMMON = 0, VBAT, @@ -58,7 +53,7 @@ enum rn5t618_channels { AIN0 }; -static const struct rn5t618_channel_ratios rn5t618_ratios[8] = { +static const struct u16_fract rn5t618_ratios[8] = { [LIMMON] = {50, 32}, /* measured across 20mOhm, amplified by 32 */ [VBAT] = {2, 1}, [VADP] = {3, 1}, |