summary refs log tree commit diff
path: root/drivers/iio/adc/max11100.c
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2020-06-28 13:36:41 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-07-07 20:24:09 +0100
commit7a3e190f9ce38674fc68ddbbf5d70bd2f43e9bd9 (patch)
treef66bf7e8a5152162d838f8c43f8644bed83f272d /drivers/iio/adc/max11100.c
parent0a9a500acdf22390c295b4b52ae2088a9c37201f (diff)
downloadlinux-7a3e190f9ce38674fc68ddbbf5d70bd2f43e9bd9.tar.gz
iio:adc:max11100: Drop of_match_ptr protection / add mod_devicetable.h include
Allows use of driver with ACPI PRP0001 base binding.
Mostly this is about trying to avoid cut and paste of this into new
drivers (it is a frequent review comment) rather than any
thought that this driver might get used on an ACPI platform.

The mod_devicetable.h include is to encourage best practice of including
any header directly used within the code (here for of_match_id)

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Jacopo Mondi <jacopo@jmondi.org>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Diffstat (limited to 'drivers/iio/adc/max11100.c')
-rw-r--r--drivers/iio/adc/max11100.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/adc/max11100.c b/drivers/iio/adc/max11100.c
index 57734f9742f6..6cf21758ca66 100644
--- a/drivers/iio/adc/max11100.c
+++ b/drivers/iio/adc/max11100.c
@@ -8,6 +8,7 @@
  */
 #include <linux/delay.h>
 #include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
 #include <linux/regulator/consumer.h>
 #include <linux/spi/spi.h>
@@ -161,7 +162,7 @@ MODULE_DEVICE_TABLE(of, max11100_ids);
 static struct spi_driver max11100_driver = {
 	.driver = {
 		.name	= "max11100",
-		.of_match_table = of_match_ptr(max11100_ids),
+		.of_match_table = max11100_ids,
 	},
 	.probe		= max11100_probe,
 	.remove		= max11100_remove,