Skip to content

Commit de1cbfe

Browse files
committed
iio: light: gp2ap020a00f: Swap of.h for mod_devicetable.h + drop of_match_ptr
Also drops ifdef protections for CONFIG_OF. Enables probing via ACPI PRP0001 and removes an example that might be cut and paste into new drivers. Signed-off-by: Jonathan Cameron <[email protected]> Reviewed-by: Alexandru Ardelean <[email protected]>
1 parent 1de94b5 commit de1cbfe

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/iio/light/gp2ap020a00f.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
#include <linux/irq.h>
3939
#include <linux/irq_work.h>
4040
#include <linux/module.h>
41+
#include <linux/mod_devicetable.h>
4142
#include <linux/mutex.h>
42-
#include <linux/of.h>
4343
#include <linux/regmap.h>
4444
#include <linux/regulator/consumer.h>
4545
#include <linux/slab.h>
@@ -1617,18 +1617,16 @@ static const struct i2c_device_id gp2ap020a00f_id[] = {
16171617

16181618
MODULE_DEVICE_TABLE(i2c, gp2ap020a00f_id);
16191619

1620-
#ifdef CONFIG_OF
16211620
static const struct of_device_id gp2ap020a00f_of_match[] = {
16221621
{ .compatible = "sharp,gp2ap020a00f" },
16231622
{ }
16241623
};
16251624
MODULE_DEVICE_TABLE(of, gp2ap020a00f_of_match);
1626-
#endif
16271625

16281626
static struct i2c_driver gp2ap020a00f_driver = {
16291627
.driver = {
16301628
.name = GP2A_I2C_NAME,
1631-
.of_match_table = of_match_ptr(gp2ap020a00f_of_match),
1629+
.of_match_table = gp2ap020a00f_of_match,
16321630
},
16331631
.probe = gp2ap020a00f_probe,
16341632
.remove = gp2ap020a00f_remove,

0 commit comments

Comments
 (0)