[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220124172032.87893-5-andriy.shevchenko@linux.intel.com>
Date: Mon, 24 Jan 2022 19:20:31 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Andreas Kemnade <andreas@...nade.info>,
linux-arm-msm@...r.kernel.org, linux-iio@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Rosin <peda@...ntia.se>
Subject: [PATCH v3 5/6] iio: afe: iio-rescale: Group rescale field assignments in ->probe()
Group rescale field assignments in the ->probe() for better maintenance.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
v3: new patch
drivers/iio/afe/iio-rescale.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
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;
--
2.34.1
Powered by blists - more mailing lists