Commit dd7062fe authored by Jonathan Cameron's avatar Jonathan Cameron
Browse files

staging:iio:adc:ad7280a: rename _read() to _read_reg()



This avoids possible confusion with read back of the channel conversions.
These two types of reads are of difference sizes with resulting differences
in the data layout of the response from the hardware.

Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarMarcelo Schmitt <marcelo.schmitt1@gmail.com>
Link: https://lore.kernel.org/r/20220206190328.333093-4-jic23@kernel.org
parent 4c59aabd
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -224,7 +224,7 @@ static int ad7280_write(struct ad7280_state *st, unsigned int devaddr,
	return spi_write(st->spi, &st->buf[0], 4);
}

static int ad7280_read(struct ad7280_state *st, unsigned int devaddr,
static int ad7280_read_reg(struct ad7280_state *st, unsigned int devaddr,
			   unsigned int addr)
{
	int ret;
@@ -476,7 +476,7 @@ static ssize_t ad7280_show_balance_timer(struct device *dev,
	unsigned int msecs;

	mutex_lock(&st->lock);
	ret = ad7280_read(st, this_attr->address >> 8,
	ret = ad7280_read_reg(st, this_attr->address >> 8,
			      this_attr->address & 0xFF);
	mutex_unlock(&st->lock);