From: Alexandru Ardelean Date: Wed, 15 Apr 2020 05:58:04 +0000 (+0300) Subject: iio: adc: ad7192: move ad7192_of_match table closer to the end of the file X-Git-Tag: Ubuntu-5.10.0-12.13~2194^2~61^2~9 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=3eca1d26dbdc1aaff6df25d992fd112f4934ef28;p=mirror_ubuntu-hirsute-kernel.git iio: adc: ad7192: move ad7192_of_match table closer to the end of the file The change is more cosmetic. There is no need to reference this table in the probe function since 'of_device_get_match_data' is used, which obtains this information from the driver object. Signed-off-by: Alexandru Ardelean Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/adc/ad7192.c b/drivers/iio/adc/ad7192.c index a0837d7e9176..2ed580521d81 100644 --- a/drivers/iio/adc/ad7192.c +++ b/drivers/iio/adc/ad7192.c @@ -908,15 +908,6 @@ static int ad7192_channels_config(struct iio_dev *indio_dev) return 0; } -static const struct of_device_id ad7192_of_match[] = { - { .compatible = "adi,ad7190", .data = &ad7192_chip_info_tbl[ID_AD7190] }, - { .compatible = "adi,ad7192", .data = &ad7192_chip_info_tbl[ID_AD7192] }, - { .compatible = "adi,ad7193", .data = &ad7192_chip_info_tbl[ID_AD7193] }, - { .compatible = "adi,ad7195", .data = &ad7192_chip_info_tbl[ID_AD7195] }, - {} -}; -MODULE_DEVICE_TABLE(of, ad7192_of_match); - static int ad7192_probe(struct spi_device *spi) { struct ad7192_state *st; @@ -1049,6 +1040,15 @@ static int ad7192_remove(struct spi_device *spi) return 0; } +static const struct of_device_id ad7192_of_match[] = { + { .compatible = "adi,ad7190", .data = &ad7192_chip_info_tbl[ID_AD7190] }, + { .compatible = "adi,ad7192", .data = &ad7192_chip_info_tbl[ID_AD7192] }, + { .compatible = "adi,ad7193", .data = &ad7192_chip_info_tbl[ID_AD7193] }, + { .compatible = "adi,ad7195", .data = &ad7192_chip_info_tbl[ID_AD7195] }, + {} +}; +MODULE_DEVICE_TABLE(of, ad7192_of_match); + static struct spi_driver ad7192_driver = { .driver = { .name = "ad7192",