diff mbox series

[v3,5/6] iio: afe: iio-rescale: Group rescale field assignments in ->probe()

Message ID 20220124172032.87893-5-andriy.shevchenko@linux.intel.com (mailing list archive)
State Superseded
Headers show
Series [v3,1/6] math.h: Introduce data types for fractional numbers | expand

Commit Message

Andy Shevchenko Jan. 24, 2022, 5:20 p.m. UTC
Group rescale field assignments in the ->probe() for better maintenance.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v3: new patch
 drivers/iio/afe/iio-rescale.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/iio/afe/iio-rescale.c b/drivers/iio/afe/iio-rescale.c
index 774eb3044edd..8b9d2aa1502e 100644
--- a/drivers/iio/afe/iio-rescale.c
+++ b/drivers/iio/afe/iio-rescale.c
@@ -322,7 +322,7 @@  static int rescale_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	rescale = iio_priv(indio_dev);
-
+	rescale->source = source;
 	rescale->cfg = of_device_get_match_data(dev);
 	rescale->numerator = 1;
 	rescale->denominator = 1;
@@ -338,8 +338,6 @@  static int rescale_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, indio_dev);
 
-	rescale->source = source;
-
 	indio_dev->name = dev_name(dev);
 	indio_dev->info = &rescale_info;
 	indio_dev->modes = INDIO_DIRECT_MODE;