]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iio: adc: ad7124: remove unused `nr` field
authorDavid Lechner <dlechner@baylibre.com>
Wed, 17 Sep 2025 20:39:23 +0000 (15:39 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 13 Oct 2025 07:37:23 +0000 (08:37 +0100)
Remove the unused `nr` field from the `ad7124_channel` struct. There
are no more users of this field (it is only assigned to but never read)
so can be removed.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/ad7124.c

index f4f445e2863026313df84e2615ead432ddbf2efd..950abdb75e6d48e006d7ddb8ba4f9bb60c445960 100644 (file)
@@ -200,7 +200,6 @@ struct ad7124_channel_config {
 };
 
 struct ad7124_channel {
-       unsigned int nr;
        struct ad7124_channel_config cfg;
        unsigned int ain;
        unsigned int slot;
@@ -1305,7 +1304,6 @@ static int ad7124_parse_channel_config(struct iio_dev *indio_dev,
                        return dev_err_probe(dev, -EINVAL,
                                             "diff-channels property of %pfwP contains invalid data\n", child);
 
-               st->channels[channel].nr = channel;
                st->channels[channel].ain = FIELD_PREP(AD7124_CHANNEL_AINP, ain[0]) |
                        FIELD_PREP(AD7124_CHANNEL_AINM, ain[1]);
 
@@ -1332,7 +1330,6 @@ static int ad7124_parse_channel_config(struct iio_dev *indio_dev,
 
        if (num_channels < AD7124_MAX_CHANNELS) {
                st->channels[num_channels] = (struct ad7124_channel) {
-                       .nr = num_channels,
                        .ain = FIELD_PREP(AD7124_CHANNEL_AINP, AD7124_CHANNEL_AINx_TEMPSENSOR) |
                                FIELD_PREP(AD7124_CHANNEL_AINM, AD7124_CHANNEL_AINx_AVSS),
                        .cfg = {