From: Andy Shevchenko Date: Wed, 26 Jan 2022 13:53:52 +0000 (+0200) Subject: iio: adc: twl4030-madc: Re-use generic struct s16_fract X-Git-Tag: v6.1-rc5~1693^2~55^2~186 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f2abd48b528931a35bc7a71e77bdf614e826f45;p=platform%2Fkernel%2Flinux-starfive.git iio: adc: twl4030-madc: Re-use generic struct s16_fract Instead of custom data type re-use generic struct s16_fract. No changes intended. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220126135353.24007-3-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/twl4030-madc.c b/drivers/iio/adc/twl4030-madc.c index 6ce40cc..f8f8aea 100644 --- a/drivers/iio/adc/twl4030-madc.c +++ b/drivers/iio/adc/twl4030-madc.c @@ -231,13 +231,7 @@ static const struct iio_chan_spec twl4030_madc_iio_channels[] = { static struct twl4030_madc_data *twl4030_madc; -struct twl4030_prescale_divider_ratios { - s16 numerator; - s16 denominator; -}; - -static const struct twl4030_prescale_divider_ratios -twl4030_divider_ratios[16] = { +static const struct s16_fract twl4030_divider_ratios[16] = { {1, 1}, /* CHANNEL 0 No Prescaler */ {1, 1}, /* CHANNEL 1 No Prescaler */ {6, 10}, /* CHANNEL 2 */ @@ -256,7 +250,6 @@ twl4030_divider_ratios[16] = { {5, 11}, /* CHANNEL 15 */ }; - /* Conversion table from -3 to 55 degrees Celcius */ static int twl4030_therm_tbl[] = { 30800, 29500, 28300, 27100,