linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org
Cc: Jonathan Cameron <jic23@kernel.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Neil Armstrong <narmstrong@baylibre.com>,
	Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Subject: [PATCH v3 2/6] iio: adc: meson_saradc: Align messages to be with physical device prefix
Date: Fri,  3 Jun 2022 13:00:00 +0300	[thread overview]
Message-ID: <20220603100004.70336-2-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20220603100004.70336-1-andriy.shevchenko@linux.intel.com>

Align messages to be printed with the physical device prefix as it's done
everywhere else in this driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
v3: new patch (inspired by previous change)
 drivers/iio/adc/meson_saradc.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c
index 4fe6b997cd03..658047370db0 100644
--- a/drivers/iio/adc/meson_saradc.c
+++ b/drivers/iio/adc/meson_saradc.c
@@ -345,6 +345,7 @@ static int meson_sar_adc_read_raw_sample(struct iio_dev *indio_dev,
 					 int *val)
 {
 	struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
+	struct device *dev = indio_dev->dev.parent;
 	int regval, fifo_chan, fifo_val, count;
 
 	if (!wait_for_completion_timeout(&priv->done,
@@ -353,16 +354,14 @@ static int meson_sar_adc_read_raw_sample(struct iio_dev *indio_dev,
 
 	count = meson_sar_adc_get_fifo_count(indio_dev);
 	if (count != 1) {
-		dev_err(&indio_dev->dev,
-			"ADC FIFO has %d element(s) instead of one\n", count);
+		dev_err(dev, "ADC FIFO has %d element(s) instead of one\n", count);
 		return -EINVAL;
 	}
 
 	regmap_read(priv->regmap, MESON_SAR_ADC_FIFO_RD, &regval);
 	fifo_chan = FIELD_GET(MESON_SAR_ADC_FIFO_RD_CHAN_ID_MASK, regval);
 	if (fifo_chan != chan->address) {
-		dev_err(&indio_dev->dev,
-			"ADC FIFO entry belongs to channel %d instead of %lu\n",
+		dev_err(dev, "ADC FIFO entry belongs to channel %d instead of %lu\n",
 			fifo_chan, chan->address);
 		return -EINVAL;
 	}
-- 
2.35.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

  reply	other threads:[~2022-06-03 10:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03  9:59 [PATCH v3 1/6] iio: adc: meson_saradc: Don't attach managed resource to IIO device object Andy Shevchenko
2022-06-03 10:00 ` Andy Shevchenko [this message]
2022-06-03 16:21   ` [PATCH v3 2/6] iio: adc: meson_saradc: Align messages to be with physical device prefix Jonathan Cameron
2022-06-03 16:50     ` Andy Shevchenko
2022-06-05 21:52   ` Martin Blumenstingl
2022-06-03 10:00 ` [PATCH v3 3/6] iio: adc: meson_saradc: Convert to use dev_err_probe() Andy Shevchenko
2022-06-05 22:01   ` Martin Blumenstingl
2022-06-03 10:00 ` [PATCH v3 4/6] iio: adc: meson_saradc: Use devm_clk_get_optional() Andy Shevchenko
2022-06-03 10:00 ` [PATCH v3 5/6] iio: adc: meson_saradc: Use temporary variable for struct device Andy Shevchenko
2022-06-05 21:54   ` Martin Blumenstingl
2022-06-03 10:00 ` [RFC PATCH v3 6/6] iio: adc: meson_saradc: Use regmap_read_poll_timeout() for busy wait Andy Shevchenko
2022-06-05 21:59   ` Martin Blumenstingl
2022-06-06 10:10     ` Andy Shevchenko
2022-06-03 16:06 ` [PATCH v3 1/6] iio: adc: meson_saradc: Don't attach managed resource to IIO device object Jonathan Cameron
2022-06-03 16:23   ` Jonathan Cameron
2022-06-03 16:29     ` Jonathan Cameron
2022-06-03 16:54       ` Andy Shevchenko
2022-06-14 10:21         ` Jonathan Cameron
2022-06-05 21:46 ` Martin Blumenstingl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220603100004.70336-2-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=jbrunet@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=khilman@baylibre.com \
    --cc=lars@metafoo.de \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=narmstrong@baylibre.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).