iio:magn:ak8974: Drop of_match_ptr protection
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 10 Sep 2020 17:32:39 +0000 (18:32 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 21 Sep 2020 17:41:34 +0000 (18:41 +0100)
This prevents use of this driver with ACPI via PRP0001 and is
an example of an anti pattern I'm trying to remove from IIO.
Hence drop from this driver.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20200910173242.621168-36-jic23@kernel.org
drivers/iio/magnetometer/ak8974.c

index 7cd9768fbcb2a478582f2f1591894badc3c3b5c1..df5131cf28a9ee2151331173470b0fe5af4e3629 100644 (file)
@@ -12,6 +12,7 @@
  * Author: Linus Walleij <linus.walleij@linaro.org>
  */
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/kernel.h>
 #include <linux/i2c.h>
 #include <linux/interrupt.h>
@@ -1051,7 +1052,7 @@ static struct i2c_driver ak8974_driver = {
        .driver  = {
                .name   = "ak8974",
                .pm = &ak8974_dev_pm_ops,
-               .of_match_table = of_match_ptr(ak8974_of_match),
+               .of_match_table = ak8974_of_match,
        },
        .probe    = ak8974_probe,
        .remove   = ak8974_remove,