Skip to content

Commit fad0ece

Browse files
dlechjic23
authored andcommitted
iio: adc: ad7380: remove unused oversampling_ratio getter
Remove a call to ad7380_get_osr() in ad7380_init_offload_msg. The returned value is never used. Signed-off-by: David Lechner <dlechner@baylibre.com> Reviewed-by: Nuno Sá <nuno.sa@analog.com> Link: https://patch.msgid.link/20250624-iio-adc-ad7380-remove-unused-oversampling_ratio-getter-v1-1-26cbee356860@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 6c5c796 commit fad0ece

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/iio/adc/ad7380.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,7 +1165,6 @@ static int ad7380_init_offload_msg(struct ad7380_state *st,
11651165
struct spi_transfer *xfer = &st->offload_xfer;
11661166
struct device *dev = &st->spi->dev;
11671167
const struct iio_scan_type *scan_type;
1168-
int oversampling_ratio;
11691168
int ret;
11701169

11711170
scan_type = iio_get_current_scan_type(indio_dev,
@@ -1195,10 +1194,6 @@ static int ad7380_init_offload_msg(struct ad7380_state *st,
11951194
}
11961195
}
11971196

1198-
ret = ad7380_get_osr(st, &oversampling_ratio);
1199-
if (ret)
1200-
return ret;
1201-
12021197
xfer->bits_per_word = scan_type->realbits;
12031198
xfer->offload_flags = SPI_OFFLOAD_XFER_RX_STREAM;
12041199
xfer->len = AD7380_SPI_BYTES(scan_type) * st->chip_info->num_simult_channels;

0 commit comments

Comments
 (0)