Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: adc: ad7266: don't set masklength

The masklength field is marked as [INTERN] and should not be set by
drivers, so remove the assignment in the ad7266 driver.

__iio_device_register() will populate this field with the correct value.

Signed-off-by: David Lechner <dlechner@baylibre.com>
Link: https://lore.kernel.org/r/20240425-b4-iio-masklength-cleanup-v1-1-d3d16318274d@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

David Lechner and committed by
Jonathan Cameron
ef64a4ad 427298c6

-1
-1
drivers/iio/adc/ad7266.c
··· 371 371 indio_dev->channels = chan_info->channels; 372 372 indio_dev->num_channels = chan_info->num_channels; 373 373 indio_dev->available_scan_masks = chan_info->scan_masks; 374 - indio_dev->masklength = chan_info->num_channels - 1; 375 374 } 376 375 377 376 static const char * const ad7266_gpio_labels[] = {