aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2020-04-19 16:02:04 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-04-25 15:43:30 +0100
commit0741678ece687f53b7e8852731822ed5646f5cb2 (patch)
treed8245c005e3787b582f1bcf6b6d097988085c153
parentiio: light: gp2ap020a00f: Swap of.h for mod_devicetable.h + drop of_match_ptr (diff)
downloadlinux-dev-0741678ece687f53b7e8852731822ed5646f5cb2.tar.xz
linux-dev-0741678ece687f53b7e8852731822ed5646f5cb2.zip
iio: light: opt3001: Add mod_devicetable.h and drop use of of_match_ptr
Enables probing via ACPI PRP0001 but mostly about removing examples that might be copied to new drivers. Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
-rw-r--r--drivers/iio/light/opt3001.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c
index 92004a2563ea..82abfa57b59c 100644
--- a/drivers/iio/light/opt3001.c
+++ b/drivers/iio/light/opt3001.c
@@ -16,6 +16,7 @@
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/module.h>
+#include <linux/mod_devicetable.h>
#include <linux/mutex.h>
#include <linux/slab.h>
#include <linux/types.h>
@@ -844,7 +845,7 @@ static struct i2c_driver opt3001_driver = {
.driver = {
.name = "opt3001",
- .of_match_table = of_match_ptr(opt3001_of_match),
+ .of_match_table = opt3001_of_match,
},
};