[PATCH v4 1/6] iio: adc: ad4851: ad4851_set_oversampling_ratio parameters update

Pop Ioan Daniel posted 6 patches 7 months ago
There is a newer version of this series
[PATCH v4 1/6] iio: adc: ad4851: ad4851_set_oversampling_ratio parameters update
Posted by Pop Ioan Daniel 7 months ago
Remove chan parameter from ad4851_set_oversampling_ratio parameters
list.

Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com>
---
changes in v4:
 - remove chan parameter from parameters list
 drivers/iio/adc/ad4851.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/adc/ad4851.c b/drivers/iio/adc/ad4851.c
index 98ebc853db79..12f90aa3a156 100644
--- a/drivers/iio/adc/ad4851.c
+++ b/drivers/iio/adc/ad4851.c
@@ -294,7 +294,6 @@ static int ad4851_scale_fill(struct iio_dev *indio_dev)
 }
 
 static int ad4851_set_oversampling_ratio(struct iio_dev *indio_dev,
-					 const struct iio_chan_spec *chan,
 					 unsigned int osr)
 {
 	struct ad4851_state *st = iio_priv(indio_dev);
@@ -831,7 +830,7 @@ static int ad4851_write_raw(struct iio_dev *indio_dev,
 	case IIO_CHAN_INFO_CALIBBIAS:
 		return ad4851_set_calibbias(st, chan->channel, val);
 	case IIO_CHAN_INFO_OVERSAMPLING_RATIO:
-		return ad4851_set_oversampling_ratio(indio_dev, chan, val);
+		return ad4851_set_oversampling_ratio(indio_dev, val);
 	default:
 		return -EINVAL;
 	}
-- 
2.34.1
Re: [PATCH v4 1/6] iio: adc: ad4851: ad4851_set_oversampling_ratio parameters update
Posted by David Lechner 7 months ago
On 5/19/25 9:02 AM, Pop Ioan Daniel wrote:
> Remove chan parameter from ad4851_set_oversampling_ratio parameters
> list.

Commit messages should explain _why_ we should make this change.
In this case, because the parameter is unused.

> 
> Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@analog.com>
> ---
Reviewed-by: David Lechner <dlechner@baylibre.com>