diff options
author | Daniel Gomez <dagmcr@gmail.com> | 2019-04-23 23:42:18 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-04-27 13:54:40 +0100 |
commit | 34c2a55b0df4448110f353f21a8a02fe3e0bddfe (patch) | |
tree | dee0ee3193bc7496c4364e2ed34b4c93013335a5 /drivers/iio/temperature | |
parent | e3faedf71d881780c2b8f6548aaacfad7f0a8372 (diff) | |
download | linux-34c2a55b0df4448110f353f21a8a02fe3e0bddfe.tar.bz2 |
iio: temperature: maxim_thermocouple: declare missing of table
Add missing <of_device_id> table for SPI driver relying on SPI
device match since compatible is in a DT binding or in a DTS.
Before this patch:
modinfo drivers/iio/temperature/maxim_thermocouple.ko | grep alias
alias: spi:max31855
alias: spi:max6675
After this patch:
modinfo drivers/iio/temperature/maxim_thermocouple.ko | grep alias
alias: spi:max31855
alias: spi:max6675
alias: of:N*T*Cmaxim,max31855C*
alias: of:N*T*Cmaxim,max31855
alias: of:N*T*Cmaxim,max6675C*
alias: of:N*T*Cmaxim,max6675
Reported-by: Javier Martinez Canillas <javier@dowhile0.org>
Signed-off-by: Daniel Gomez <dagmcr@gmail.com>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/temperature')
-rw-r--r-- | drivers/iio/temperature/maxim_thermocouple.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/iio/temperature/maxim_thermocouple.c b/drivers/iio/temperature/maxim_thermocouple.c index c31b9633f32d..c613a64c017f 100644 --- a/drivers/iio/temperature/maxim_thermocouple.c +++ b/drivers/iio/temperature/maxim_thermocouple.c @@ -10,6 +10,8 @@ #include <linux/init.h> #include <linux/mutex.h> #include <linux/err.h> +#include <linux/of.h> +#include <linux/of_device.h> #include <linux/spi/spi.h> #include <linux/iio/iio.h> #include <linux/iio/trigger.h> @@ -262,9 +264,17 @@ static const struct spi_device_id maxim_thermocouple_id[] = { }; MODULE_DEVICE_TABLE(spi, maxim_thermocouple_id); +static const struct of_device_id maxim_thermocouple_of_match[] = { + { .compatible = "maxim,max6675" }, + { .compatible = "maxim,max31855" }, + { }, +}; +MODULE_DEVICE_TABLE(of, maxim_thermocouple_of_match); + static struct spi_driver maxim_thermocouple_driver = { .driver = { .name = MAXIM_THERMOCOUPLE_DRV_NAME, + .of_match_table = maxim_thermocouple_of_match, }, .probe = maxim_thermocouple_probe, .remove = maxim_thermocouple_remove, |