diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-09-10 18:32:22 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-09-21 18:41:29 +0100 |
commit | 0e62470652faed4a657123373a5ff725320d0b3d (patch) | |
tree | b6bbebb4a4fcf44e586083dcd02c3b940b874a18 /drivers/iio/pressure/ms5611_spi.c | |
parent | eb25d0aa4ae02cc31d77c9b677713d3be37761d8 (diff) | |
download | lwn-0e62470652faed4a657123373a5ff725320d0b3d.tar.gz lwn-0e62470652faed4a657123373a5ff725320d0b3d.zip |
iio:pressure:ms5611: Drop of_match_ptr and CONFIG_OF protections
These prevents use of this driver with ACPI via PRP0001 and are
an example of an anti pattern I'm trying to remove from IIO.
Hence drop them from this driver.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Tomasz Duszynski <tduszyns@gmail.com>
Link: https://lore.kernel.org/r/20200910173242.621168-19-jic23@kernel.org
Diffstat (limited to 'drivers/iio/pressure/ms5611_spi.c')
-rw-r--r-- | drivers/iio/pressure/ms5611_spi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/iio/pressure/ms5611_spi.c b/drivers/iio/pressure/ms5611_spi.c index 4799aa57135e..45d3a7d5be8e 100644 --- a/drivers/iio/pressure/ms5611_spi.c +++ b/drivers/iio/pressure/ms5611_spi.c @@ -9,7 +9,7 @@ #include <linux/delay.h> #include <linux/module.h> #include <linux/spi/spi.h> -#include <linux/of_device.h> +#include <linux/mod_devicetable.h> #include <asm/unaligned.h> @@ -115,14 +115,12 @@ static int ms5611_spi_remove(struct spi_device *spi) return ms5611_remove(spi_get_drvdata(spi)); } -#if defined(CONFIG_OF) static const struct of_device_id ms5611_spi_matches[] = { { .compatible = "meas,ms5611" }, { .compatible = "meas,ms5607" }, { } }; MODULE_DEVICE_TABLE(of, ms5611_spi_matches); -#endif static const struct spi_device_id ms5611_id[] = { { "ms5611", MS5611 }, @@ -134,7 +132,7 @@ MODULE_DEVICE_TABLE(spi, ms5611_id); static struct spi_driver ms5611_driver = { .driver = { .name = "ms5611", - .of_match_table = of_match_ptr(ms5611_spi_matches) + .of_match_table = ms5611_spi_matches }, .id_table = ms5611_id, .probe = ms5611_spi_probe, |