Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1cd6d05 authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Greg Kroah-Hartman
Browse files

iio: dac: ad5592r: un-indent code-block for scale read



[ Upstream commit b004fe33034cc64f72c20923be71cf1e6c9a624c ]

The next rework may require an unindentation of a code block in
ad5592r_read_raw(), which would make review a bit more difficult.

This change unindents the code block for reading the scale of the
non-temperature channels.

Signed-off-by: default avatarAlexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20200706110259.23947-2-alexandru.ardelean@analog.com


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Stable-dep-of: 279428df8883 ("iio: dac: ad5592r: fix temperature channel scaling value")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3bd4e475
Loading
Loading
Loading
Loading
+12 −14
Original line number Original line Diff line number Diff line
@@ -377,7 +377,7 @@ static int ad5592r_read_raw(struct iio_dev *iio_dev,
{
{
	struct ad5592r_state *st = iio_priv(iio_dev);
	struct ad5592r_state *st = iio_priv(iio_dev);
	u16 read_val;
	u16 read_val;
	int ret;
	int ret, mult;


	switch (m) {
	switch (m) {
	case IIO_CHAN_INFO_RAW:
	case IIO_CHAN_INFO_RAW:
@@ -415,8 +415,7 @@ static int ad5592r_read_raw(struct iio_dev *iio_dev,
			*val = div_s64_rem(tmp, 1000000000LL, val2);
			*val = div_s64_rem(tmp, 1000000000LL, val2);


			return IIO_VAL_INT_PLUS_MICRO;
			return IIO_VAL_INT_PLUS_MICRO;
		} else {
		}
			int mult;


		mutex_lock(&st->lock);
		mutex_lock(&st->lock);


@@ -431,7 +430,6 @@ static int ad5592r_read_raw(struct iio_dev *iio_dev,


		*val2 = chan->scan_type.realbits;
		*val2 = chan->scan_type.realbits;
		ret = IIO_VAL_FRACTIONAL_LOG2;
		ret = IIO_VAL_FRACTIONAL_LOG2;
		}
		break;
		break;
	case IIO_CHAN_INFO_OFFSET:
	case IIO_CHAN_INFO_OFFSET:
		ret = ad5592r_get_vref(st);
		ret = ad5592r_get_vref(st);