Commit d43c7006 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Jonathan Cameron

iio: adc: meson_saradc: Align messages to be with physical device prefix

Align messages to be printed with the physical device prefix as it's done
everywhere else in this driver.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20220603100004.70336-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent ec25bb6e
...@@ -345,6 +345,7 @@ static int meson_sar_adc_read_raw_sample(struct iio_dev *indio_dev, ...@@ -345,6 +345,7 @@ static int meson_sar_adc_read_raw_sample(struct iio_dev *indio_dev,
int *val) int *val)
{ {
struct meson_sar_adc_priv *priv = iio_priv(indio_dev); struct meson_sar_adc_priv *priv = iio_priv(indio_dev);
struct device *dev = indio_dev->dev.parent;
int regval, fifo_chan, fifo_val, count; int regval, fifo_chan, fifo_val, count;
if (!wait_for_completion_timeout(&priv->done, if (!wait_for_completion_timeout(&priv->done,
...@@ -353,16 +354,14 @@ static int meson_sar_adc_read_raw_sample(struct iio_dev *indio_dev, ...@@ -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); count = meson_sar_adc_get_fifo_count(indio_dev);
if (count != 1) { if (count != 1) {
dev_err(&indio_dev->dev, dev_err(dev, "ADC FIFO has %d element(s) instead of one\n", count);
"ADC FIFO has %d element(s) instead of one\n", count);
return -EINVAL; return -EINVAL;
} }
regmap_read(priv->regmap, MESON_SAR_ADC_FIFO_RD, &regval); regmap_read(priv->regmap, MESON_SAR_ADC_FIFO_RD, &regval);
fifo_chan = FIELD_GET(MESON_SAR_ADC_FIFO_RD_CHAN_ID_MASK, regval); fifo_chan = FIELD_GET(MESON_SAR_ADC_FIFO_RD_CHAN_ID_MASK, regval);
if (fifo_chan != chan->address) { if (fifo_chan != chan->address) {
dev_err(&indio_dev->dev, dev_err(dev, "ADC FIFO entry belongs to channel %d instead of %lu\n",
"ADC FIFO entry belongs to channel %d instead of %lu\n",
fifo_chan, chan->address); fifo_chan, chan->address);
return -EINVAL; return -EINVAL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment