Commit 7277a74a authored by Jonathan Cameron's avatar Jonathan Cameron

iio:adc:lpc32xx: Drop of_match_ptr protection

Whilst is unlikely anyone will be using this part with an ACPI PRP0001
based binding any time soon, we are getting a lot of cut and pasting
of this pattern so I am looking to remove it entirely from IIO.

In this case CONFIG_OF protections also removed and
mod_devicetable.h include added given direct use of struct of_device_id.
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
parent 0954bc97
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
...@@ -209,19 +210,17 @@ static int lpc32xx_adc_probe(struct platform_device *pdev) ...@@ -209,19 +210,17 @@ static int lpc32xx_adc_probe(struct platform_device *pdev)
return 0; return 0;
} }
#ifdef CONFIG_OF
static const struct of_device_id lpc32xx_adc_match[] = { static const struct of_device_id lpc32xx_adc_match[] = {
{ .compatible = "nxp,lpc3220-adc" }, { .compatible = "nxp,lpc3220-adc" },
{}, {},
}; };
MODULE_DEVICE_TABLE(of, lpc32xx_adc_match); MODULE_DEVICE_TABLE(of, lpc32xx_adc_match);
#endif
static struct platform_driver lpc32xx_adc_driver = { static struct platform_driver lpc32xx_adc_driver = {
.probe = lpc32xx_adc_probe, .probe = lpc32xx_adc_probe,
.driver = { .driver = {
.name = LPC32XXAD_NAME, .name = LPC32XXAD_NAME,
.of_match_table = of_match_ptr(lpc32xx_adc_match), .of_match_table = lpc32xx_adc_match,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment