summaryrefslogtreecommitdiffstats
path: root/drivers/iio/dac/ti-dac082s085.c
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2020-09-10 18:32:18 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-09-21 18:41:28 +0100
commit40f84dd0e60c5ed5c21ab8204d24604db0612dbc (patch)
tree8f02a5a7f765d612eaca0d3541c87a247d120395 /drivers/iio/dac/ti-dac082s085.c
parent2de887b0cfc7ec9dbfe3fa458599419689e4c5d6 (diff)
downloadlinux-40f84dd0e60c5ed5c21ab8204d24604db0612dbc.tar.bz2
iio:dac:ti-dac082s085: Drop of_match_ptr and CONFIG_OF protections
These prevent the 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: Lukas Wunner <lukas@wunner.de> Link: https://lore.kernel.org/r/20200910173242.621168-15-jic23@kernel.org
Diffstat (limited to 'drivers/iio/dac/ti-dac082s085.c')
-rw-r--r--drivers/iio/dac/ti-dac082s085.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iio/dac/ti-dac082s085.c b/drivers/iio/dac/ti-dac082s085.c
index 86bfb1c3f9b9..de33c1fc6e0b 100644
--- a/drivers/iio/dac/ti-dac082s085.c
+++ b/drivers/iio/dac/ti-dac082s085.c
@@ -14,6 +14,7 @@
#include <linux/iio/iio.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
@@ -324,7 +325,6 @@ static int ti_dac_remove(struct spi_device *spi)
return 0;
}
-#ifdef CONFIG_OF
static const struct of_device_id ti_dac_of_id[] = {
{ .compatible = "ti,dac082s085" },
{ .compatible = "ti,dac102s085" },
@@ -335,7 +335,6 @@ static const struct of_device_id ti_dac_of_id[] = {
{ }
};
MODULE_DEVICE_TABLE(of, ti_dac_of_id);
-#endif
static const struct spi_device_id ti_dac_spi_id[] = {
{ "dac082s085", dual_8bit },
@@ -351,7 +350,7 @@ MODULE_DEVICE_TABLE(spi, ti_dac_spi_id);
static struct spi_driver ti_dac_driver = {
.driver = {
.name = "ti-dac082s085",
- .of_match_table = of_match_ptr(ti_dac_of_id),
+ .of_match_table = ti_dac_of_id,
},
.probe = ti_dac_probe,
.remove = ti_dac_remove,