diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-09-10 19:32:13 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-09-21 19:41:27 +0200 |
commit | b49e6eb1c7dffd86af7aaf922380ce2e231e8492 (patch) | |
tree | ed1bec36eada04ada8d2b3f63fa168ca64f528f4 /drivers/iio/dac/ad5446.c | |
parent | iio:potentiometer:mcp4531: Drop of_match_ptr and CONFIG_OF protections. (diff) | |
download | linux-b49e6eb1c7dffd86af7aaf922380ce2e231e8492.tar.xz linux-b49e6eb1c7dffd86af7aaf922380ce2e231e8492.zip |
iio:dac:ad5446: Drop of_match_ptr and CONFIG_OF protections
These prevent 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: Michael Hennerich <michael.hennerich@analog.com>
Link: https://lore.kernel.org/r/20200910173242.621168-10-jic23@kernel.org
Diffstat (limited to 'drivers/iio/dac/ad5446.c')
-rw-r--r-- | drivers/iio/dac/ad5446.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iio/dac/ad5446.c b/drivers/iio/dac/ad5446.c index 935a6177569f..d87e21016863 100644 --- a/drivers/iio/dac/ad5446.c +++ b/drivers/iio/dac/ad5446.c @@ -17,6 +17,7 @@ #include <linux/regulator/consumer.h> #include <linux/err.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/iio/iio.h> #include <linux/iio/sysfs.h> @@ -478,13 +479,11 @@ static const struct spi_device_id ad5446_spi_ids[] = { }; MODULE_DEVICE_TABLE(spi, ad5446_spi_ids); -#ifdef CONFIG_OF static const struct of_device_id ad5446_of_ids[] = { { .compatible = "ti,dac7512" }, { } }; MODULE_DEVICE_TABLE(of, ad5446_of_ids); -#endif static int ad5446_spi_probe(struct spi_device *spi) { @@ -502,7 +501,7 @@ static int ad5446_spi_remove(struct spi_device *spi) static struct spi_driver ad5446_spi_driver = { .driver = { .name = "ad5446", - .of_match_table = of_match_ptr(ad5446_of_ids), + .of_match_table = ad5446_of_ids, }, .probe = ad5446_spi_probe, .remove = ad5446_spi_remove, |