diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-09-10 18:32:16 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2020-09-21 18:41:28 +0100 |
commit | 34860a19a3ac5546757cacfba191cb2b635835c3 (patch) | |
tree | be4a80c4fb760c9b27bda60ab097d741fb9090b9 /drivers/iio/dac | |
parent | fe506cc5af0b5c44ce593467c0500dd16bf78919 (diff) |
iio:dac:ad7303: Drop of_match_ptr protection
This prevents use of this driver with ACPI via PRP0001 and are
an example of an anti pattern I'm trying to remove from IIO.
Also add mod_devicetable.h include given struct of_device_id is
declared there.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20200910173242.621168-13-jic23@kernel.org
Diffstat (limited to 'drivers/iio/dac')
-rw-r--r-- | drivers/iio/dac/ad7303.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/dac/ad7303.c b/drivers/iio/dac/ad7303.c index 4460aa57a33f..20c85c2a636c 100644 --- a/drivers/iio/dac/ad7303.c +++ b/drivers/iio/dac/ad7303.c @@ -7,6 +7,7 @@ #include <linux/err.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/kernel.h> #include <linux/spi/spi.h> #include <linux/slab.h> @@ -287,7 +288,7 @@ MODULE_DEVICE_TABLE(spi, ad7303_spi_ids); static struct spi_driver ad7303_driver = { .driver = { .name = "ad7303", - .of_match_table = of_match_ptr(ad7303_spi_of_match), + .of_match_table = ad7303_spi_of_match, }, .probe = ad7303_probe, .remove = ad7303_remove, |