Skip to content

Commit 3eca1d2

Browse files
commodoJonathan Cameron
authored andcommitted
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 <alexandru.ardelean@analog.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 2c7c8dc commit 3eca1d2

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

‎drivers/iio/adc/ad7192.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -908,15 +908,6 @@ static int ad7192_channels_config(struct iio_dev *indio_dev)
908908
return 0;
909909
}
910910

911-
static const struct of_device_id ad7192_of_match[] = {
912-
{ .compatible = "adi,ad7190", .data = &ad7192_chip_info_tbl[ID_AD7190] },
913-
{ .compatible = "adi,ad7192", .data = &ad7192_chip_info_tbl[ID_AD7192] },
914-
{ .compatible = "adi,ad7193", .data = &ad7192_chip_info_tbl[ID_AD7193] },
915-
{ .compatible = "adi,ad7195", .data = &ad7192_chip_info_tbl[ID_AD7195] },
916-
{}
917-
};
918-
MODULE_DEVICE_TABLE(of, ad7192_of_match);
919-
920911
static int ad7192_probe(struct spi_device *spi)
921912
{
922913
struct ad7192_state *st;
@@ -1049,6 +1040,15 @@ static int ad7192_remove(struct spi_device *spi)
10491040
return 0;
10501041
}
10511042

1043+
static const struct of_device_id ad7192_of_match[] = {
1044+
{ .compatible = "adi,ad7190", .data = &ad7192_chip_info_tbl[ID_AD7190] },
1045+
{ .compatible = "adi,ad7192", .data = &ad7192_chip_info_tbl[ID_AD7192] },
1046+
{ .compatible = "adi,ad7193", .data = &ad7192_chip_info_tbl[ID_AD7193] },
1047+
{ .compatible = "adi,ad7195", .data = &ad7192_chip_info_tbl[ID_AD7195] },
1048+
{}
1049+
};
1050+
MODULE_DEVICE_TABLE(of, ad7192_of_match);
1051+
10521052
static struct spi_driver ad7192_driver = {
10531053
.driver = {
10541054
.name = "ad7192",

0 commit comments

Comments
 (0)